com.sas.services.storedprocess.metadata
Class SourceCodeRepositoryUtil

com.sas.services.storedprocess.metadata.SourceCodeRepositoryUtil

public class SourceCodeRepositoryUtil

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
SourceCodeRepositoryUtil(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
 DirectoryInterface createSourceCodeRepository(java.lang.String path, java.lang.String description)
          Create a new source code repository.
 java.util.List<DirectoryInterface> getSourceCodeRepositories()
          Obtain a list of source code repositories.
 DirectoryInterface locateSourceCodeRepository(java.lang.String name)
          Locate an existing source code repository.
 

Constructor Detail

SourceCodeRepositoryUtil

public SourceCodeRepositoryUtil(ServerContextInterface serverContext)
                         throws java.rmi.RemoteException
Constructs a SourceCodeRepositoryUtil using the supplied ServerContextInterface.

Throws:
java.rmi.RemoteException

SourceCodeRepositoryUtil

public SourceCodeRepositoryUtil(LogicalServerInterface logicalServer)
                         throws java.rmi.RemoteException,
                                ServiceException
Constructs a SourceCodeRepositoryUtil by obtaining the ServerContextInterface from the supplied LogicalServerInterface.

Throws:
java.rmi.RemoteException
ServiceException
Method Detail

createSourceCodeRepository

public DirectoryInterface createSourceCodeRepository(java.lang.String path,
                                                     java.lang.String description)
                                              throws ServiceException,
                                                     java.rmi.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
java.rmi.RemoteException

locateSourceCodeRepository

public DirectoryInterface locateSourceCodeRepository(java.lang.String name)
                                              throws ServiceException,
                                                     java.rmi.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
java.rmi.RemoteException

getSourceCodeRepositories

public java.util.List<DirectoryInterface> getSourceCodeRepositories()
                                                             throws ServiceException,
                                                                    java.rmi.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
java.rmi.RemoteException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.