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 Summary
ConstructorsConstructorDescriptionSourceCodeRepositoryUtil(LogicalServerInterface logicalServer) Constructs a SourceCodeRepositoryUtil by obtaining the ServerContextInterface from the supplied LogicalServerInterface.SourceCodeRepositoryUtil(ServerContextInterface serverContext) Constructs a SourceCodeRepositoryUtil using the supplied ServerContextInterface. -
Method Summary
Modifier and TypeMethodDescriptioncreateSourceCodeRepository(String path, String description) Create a new source code repository.List<DirectoryInterface> Obtain a list of source code repositories.locateSourceCodeRepository(String name) Locate an existing source code repository.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SourceCodeRepositoryUtil
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:
RemoteExceptionServiceException
-
-
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 createddescription- an optional description of the source code repository to be created- Returns:
- the
DirectoryInterfacecorresponding 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 exceptionRemoteException
-
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
DirectoryInterfacecorresponding to the located source code repository; null, if not found - Throws:
ServiceException- if there is a metadata access exceptionRemoteException
-
getSourceCodeRepositories
public List<DirectoryInterface> getSourceCodeRepositories() throws ServiceException, RemoteExceptionObtain 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 aDirectoryInterface.- Returns:
- the list of source code repositories
- Throws:
ServiceException- if there is a metadata access exceptionRemoteException
-