Class SourceCodeRepositoryUtil

java.lang.Object
com.sas.services.storedprocess.metadata.SourceCodeRepositoryUtil

public class SourceCodeRepositoryUtil extends Object
A utility class that provides methods to manipulate source code repositories. A source code repository is a location on the application server that contains stored process source code and is represented by DirectoryInterface. Source code repositories are linked to a ServerContextInterface. This class is used by constructing a SourceCodeRepositoryUtil with either a LogicalServerInterface or a ServerContextInterface of interest and then invoking the appropriate method(s). Methods exist to obtain a list of source code repositories, locate an existing source code repository by name and create a new source code repository. An existing source code repository can be deleted by calling delete() on DirectoryInterface.
  • Constructor Details

    • SourceCodeRepositoryUtil

      public SourceCodeRepositoryUtil(ServerContextInterface serverContext) throws RemoteException
      Constructs a SourceCodeRepositoryUtil using the supplied ServerContextInterface.
      Throws:
      RemoteException
    • SourceCodeRepositoryUtil

      public SourceCodeRepositoryUtil(LogicalServerInterface logicalServer) throws RemoteException, ServiceException
      Constructs a SourceCodeRepositoryUtil by obtaining the ServerContextInterface from the supplied LogicalServerInterface.
      Throws:
      RemoteException
      ServiceException
  • Method Details

    • createSourceCodeRepository

      public DirectoryInterface createSourceCodeRepository(String path, String description) throws ServiceException, RemoteException
      Create a new source code repository. The new repository is linked to the server context used to create this SourceCodeRepositoryUtil object. Do note the same Joma factory and store associated with the server context is used to create and persist the new source code repository.
      Parameters:
      path - of the source code repository to be created
      description - an optional description of the source code repository to be created
      Returns:
      the DirectoryInterface corresponding to the created source code repository
      Throws:
      ServiceException - if a source code repository of the same name exists or if there is a metadata access exception
      RemoteException
    • locateSourceCodeRepository

      public DirectoryInterface locateSourceCodeRepository(String name) throws ServiceException, RemoteException
      Locate an existing source code repository. The list of source code repositories linked to server context used to create this SourceCodeRepositoryUtil object is searched.
      Parameters:
      name - of the source code repository to be located
      Returns:
      the DirectoryInterface corresponding to the located source code repository; null, if not found
      Throws:
      ServiceException - if there is a metadata access exception
      RemoteException
    • getSourceCodeRepositories

      public List<DirectoryInterface> getSourceCodeRepositories() throws ServiceException, RemoteException
      Obtain a list of source code repositories. The list of source code repositories linked to server context used to create this SourceCodeRepositoryUtil object is returned. Each element of the list is a DirectoryInterface.
      Returns:
      the list of source code repositories
      Throws:
      ServiceException - if there is a metadata access exception
      RemoteException