com.sas.services.information
Interface RepositoryInterface

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
ChildRepositoryInterface, DAVRepositoryInterface, MetadataRepositoryInterface, OMIRepositoryInterface
All Known Implementing Classes:
AbstractRepository, DAVChildRepository, DAVRepository, OMIServerChildRepository, OMIServerRepository

public interface RepositoryInterface
extends java.rmi.Remote

The Repository is a single persistent store for metadata used by client applications.


Field Summary
static int PROFILE_BEST
           
static int PROFILE_NO
           
static int PROFILE_POSSIBLE
           
 
Method Summary
 void addEntity(MetadataInterface input)
          Add an entity to the repository.
 void addListener(RepositoryListenerInterface listener)
          Add a listener to receive event notifications from the repository instance.
 void addRootFolder(FolderInterface folder)
          Make a folder a root folder of this repository.
 BrowseMetadataInterface browseFetch(java.lang.String entityKey, FilterInterface filter)
          Fetch a single object from the repository using the key.
 java.util.List browseFolder(java.lang.String folderISEntityKey, FilterInterface filter)
          Get information about a specific folder.
 java.util.List browseFolderRecursive(java.lang.String folderISEntityKey, FilterInterface filter)
          Search a folder tree recursively using the filter.
 BrowseMetadataInterface browseObjectByPath(PathUrl pathurl, FilterInterface filter)
          Retrieve an object based on its PathUrl.
 java.util.List browseSearch(FilterInterface filter)
          Search the repository, the objects that are returned are not cached, and are in a generic container that is not remotable, doesn't go to the server for data that wasn't originally retrieved, and not persistable.
 void close()
          Close the connection and get rid of the cache.
 boolean connect(java.lang.String host, int port, java.lang.String id, java.lang.String password, java.lang.String base)
          Connect a user to a repository.
 boolean connect(java.lang.String user, java.lang.String password, RepositoryDef config)
          Connect to a repository using the configuration provided in a RepositoryDef object.
 boolean connectWithProxy(java.lang.String host, int port, java.lang.String id, java.lang.String password, java.lang.String base, java.lang.String proxy, boolean isSecure)
          Connect a user to a repository.
 void deleteEntity(MetadataInterface input)
          Delete an entity in the repository.
 MetadataInterface factoryProcess(java.lang.Object o)
          Process a raw repository object into a smart object.
 boolean factoryTest(java.lang.Object testObject, java.lang.String filterString)
          Test an object against a Factory filter.
 MetadataInterface fetch(java.lang.String repositoryKey)
          Fetch an object from the repository given the repository key.
 MetadataInterface fetch(java.lang.String repositoryKey, boolean bypassCache)
          Fetch an object from the repository given the repository key.
 MetadataInterface fetchByUrl(java.lang.String entityURL, boolean bypassCache)
          Fetch an object from the repository given the URL.
 void fromByteArry(UserContextInterface uci, byte[] data)
          Initialize an instance of a repository from state saved in a byte array.
 java.lang.String getBase()
          Get the search base.
 com.sas.services.cache.CacheStatistics getCacheStatistics()
          Get the cache statistics for the repository cache.
 java.lang.String getDomain()
          Get the domain for this repository.
 com.sas.services.information.rules.EvaluatorInterface getEvaluator(java.lang.Object o)
          This method is used by the Factory to get an evaluator that will evaluate factory rules against an object's data to determine if it matches the rule.
 java.lang.String getFactoryKey(java.lang.Object o)
          Get the factory key for objects from this repository.
 java.lang.String getHost()
          Get the name of the host this repository is running on.
 IdentityInterface getIdentity()
          Get the authenticated user identity.
 java.lang.String getISName()
          Get the Information Service configuration name for this repository if it exists.
 MetadataInterface getObjectByPath(PathUrl url)
          Get an object in the BIP tree using a PathUrl to find it.
 MetadataInterface getObjectByPath(java.lang.String rootFolderName, java.lang.String path, java.lang.Class type)
          Deprecated. Use getObjectByPath( String rootFolderName, String path, String type)
 MetadataInterface getObjectByPath(java.lang.String rootFolderName, java.lang.String path, java.lang.String type)
          Deprecated. in favor of getObjectByPathString
 MetadataInterface getObjectByPathString(java.lang.String rootFolderName, java.lang.String path, java.lang.String type)
          Get an object by path.
 int getPort()
          Get the port number of the server this repository is using.
 java.lang.String getPrincipal()
          Get the principal name this instance connected with.
 FolderInterface getRootFolder(java.lang.String name)
          Get a root folder in the repository.
 java.util.List getRootFolders()
          Get all the root folders in the repository.
 ServerInterface getServer()
          Get the ServerInterface that controls this repository.
 MetadataInterface getTrackedObject(int trackingId)
          Deprecated. Tracking id usage is no longer supported.
 java.lang.String getUniqueId()
          Get a unique identifier for this repository instance.
 java.lang.String getUrl()
          Get the URL that represents the specific instance for a repository.
 PersonInterface getUser()
          Get the person entity that represents the user that is connected to the repository.
 UserContextInterface getUserContext()
          Get the UserContext this repository was connected for.
 boolean isDestroyed()
          Check if the repostiory instance has been closed.
 boolean isEqual(java.lang.Object o)
           
 int isProfileRepository(java.lang.String url)
          Returns true if this repository supports profile storage.
 FolderInterface makeRootFolder(java.lang.String name)
          Make a root folder in the repository.
 java.lang.Object narrow(com.sas.services.information.RepositoryData entity)
           
 ChildRepositoryInterface newChild()
          Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.
 MetadataInterface newMetadata(MetadataInterface model, java.lang.String name)
          Deprecated. in favor of newMetadataByModel.
 MetadataInterface newMetadata(java.lang.String reposId, java.lang.String name, java.lang.String type)
          Create a new metadata entity.
 MetadataInterface newMetadataByModel(MetadataInterface model, java.lang.String name)
          Create a new metadata entity.
 MetadataInterface produceDefaultMetadata(java.lang.Object o)
          Return the default metadata object for this repository.
 void refreshAllData()
          Refresh all of the data that's in the cache.
 void refreshEntity(MetadataInterface mi)
          Refresh an entity from the data in the server.
 void removeListener(RepositoryListenerInterface listener)
          Remove a listener from the list of active event listeners for this repository.
 FolderInterface removeRootFolder(java.lang.String folderName)
          Remove a folder as a root folder for the repository, but don't delete it.
 java.util.List search(FilterInterface filter)
          Search the repository using the provided filter.
 FilteredFolderInterface searchTree(FolderInterface baseFolder, FilterInterface filter)
          Deprecated. in favor of searchTreeFromBase.
 FilteredFolderInterface searchTree(java.lang.String rootFolderName, FilterInterface filter)
          Search the specified folder tree in the repository using the provided filter.
 FilteredFolderInterface searchTreeFromBase(FolderInterface baseFolder, FilterInterface filter)
          Search the specified folder tree in the repository using the provided filter.
 FilteredFolderInterface searchTreeFromBaseWithScope(FolderInterface baseFolder, FilterInterface filter, int levels)
          Search the specified folder tree in the repository using the provided filter.
 void setDomain(java.lang.String domain)
          Set the string for the security domain this server is running in.
 void setISName(java.lang.String name)
          Set the name that was used to connect to the repository.
 void setUser(PersonInterface person)
          Deprecated. This is not referenced outside platform services, and shouldn't be called by a client. The public method will no longer have any effect.
 void setUserContext(UserContextInterface user)
          Set the UserContext that this repository belongs to.
 byte[] toByteArray()
          Write the current state of the repository to a byte array.
 

Field Detail

PROFILE_NO

static final int PROFILE_NO
See Also:
Constant Field Values

PROFILE_POSSIBLE

static final int PROFILE_POSSIBLE
See Also:
Constant Field Values

PROFILE_BEST

static final int PROFILE_BEST
See Also:
Constant Field Values
Method Detail

setISName

void setISName(java.lang.String name)
               throws java.rmi.RemoteException
Set the name that was used to connect to the repository. This method should be used by the InformationService connect methods. If this is used by client applications, certain functions may not work correctly.

Parameters:
name - The name that was used to connect to the repository. This name should match the Information Service RepositoryDef name.
Throws:
java.rmi.RemoteException

getISName

java.lang.String getISName()
                           throws java.rmi.RemoteException
Get the Information Service configuration name for this repository if it exists. It looks through the ReposDefs for the best match and returns the name.

Returns:
The ReposDef name for this repository.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

setUserContext

void setUserContext(UserContextInterface user)
                    throws java.rmi.RemoteException
Set the UserContext that this repository belongs to. This will be used to retrieve a logging interface as well as a session when necessary.

Parameters:
user - The UserContext this repository was connected for.
Throws:
java.rmi.RemoteException - In the event of network failure.

getUserContext

UserContextInterface getUserContext()
                                    throws java.rmi.RemoteException
Get the UserContext this repository was connected for. This may be null if none was set.

Returns:
The UserContext this repostiory is connected for.
Throws:
java.rmi.RemoteException - in the event of network failure.

setUser

void setUser(PersonInterface person)
             throws java.rmi.RemoteException
Deprecated. This is not referenced outside platform services, and shouldn't be called by a client. The public method will no longer have any effect.

Set the entity that represents the user that is connected to the repository.

Parameters:
person - The Person entity that represents the user who is connected. This can only be set once, and if non-null, will throw an IllegalStateException.
Throws:
java.lang.IllegalStateException - if called when the person has already been set.
java.rmi.RemoteException - in the event of remote access errors.

getUser

PersonInterface getUser()
                        throws java.rmi.RemoteException
Get the person entity that represents the user that is connected to the repository.

Returns:
The person entity. This may be null if no Person entity for the user exists in the repository.
Throws:
java.rmi.RemoteException - in the event of remote access errors.

getIdentity

IdentityInterface getIdentity()
                              throws ServiceException,
                                     java.rmi.RemoteException
Get the authenticated user identity. This will either be a PersonInterface object or an IdentityGroupInterface object.

Returns:
The user identity.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

newMetadata

MetadataInterface newMetadata(java.lang.String reposId,
                              java.lang.String name,
                              java.lang.String type)
                              throws ServiceException,
                                     java.rmi.RemoteException
Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Parameters:
reposId - The ID of the new item in the repository or the repository itself. The meaning of this is repository-specific.
name - The name of the new repository entity.
type - The repository-specific type to create.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - in the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

newMetadata

MetadataInterface newMetadata(MetadataInterface model,
                              java.lang.String name)
                              throws ServiceException,
                                     java.rmi.RemoteException
Deprecated. in favor of newMetadataByModel.

Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Parameters:
model - A Metadata object to use as a "model" for the new item. The new metadata will have the same type, same repository, and may use the repository ID of the model as a basis for its own.
name - The name of the new repository entity.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - in the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

newMetadataByModel

MetadataInterface newMetadataByModel(MetadataInterface model,
                                     java.lang.String name)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Create a new metadata entity. It isn't stored in the repository until the addEntity() method is called. This is just a convenient way to get a new metadata object created.

Parameters:
model - A Metadata object to use as a "model" for the new item. The new metadata will have the same type, same repository, and may use the repository ID of the model as a basis for its own.
name - The name of the new repository entity.
Returns:
a new MetadataInterface object.
Throws:
ServiceException - in the event of a parameter or configuration error.
java.rmi.RemoteException - in the event of a network error.

fetch

MetadataInterface fetch(java.lang.String repositoryKey)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the repository given the repository key.

Parameters:
repositoryKey - The identifier for the object from the repository. This should be formatted as the repository ID followed by a slash, then the repository specific type. This string can be obtained using the Metadata.getReposKey method.
Returns:
The object matching the repository ID, or null.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

fetchByUrl

MetadataInterface fetchByUrl(java.lang.String entityURL,
                             boolean bypassCache)
                             throws ServiceException,
                                    java.rmi.RemoteException
Fetch an object from the repository given the URL. If the URL doesn't match this repository instance, a ServiceException is thrown.

Parameters:
entityURL - The URL string of the object to fetch.
bypassCache - If true, the repository cache is bypassed and a trip to the persistent store is forced.
Returns:
The fetched object if found, null otherwise.
Throws:
ServiceException - If the URL doesn't match the instance.
java.rmi.RemoteException - In the event of remote object failure.

fetch

MetadataInterface fetch(java.lang.String repositoryKey,
                        boolean bypassCache)
                        throws ServiceException,
                               java.rmi.RemoteException
Fetch an object from the repository given the repository key. If the bypassCache flag is set then the cache will not be checked before retrieving the object from the server. If the flag is not set, then the behaviour is the same as the fetch method.

Parameters:
repositoryKey - The identifier for the object from the repository. This should be formatted as the repository ID followed by a slash, then the repository specific type. This string can be obtained using the Metadata.getReposKey method.
bypassCache - Boolean flag determines whether the cache should be checked for the object before forcing a trip to the server or not.
Returns:
The object matching the repository ID, or null.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

search

java.util.List search(FilterInterface filter)
                      throws ServiceException,
                             java.rmi.RemoteException
Search the repository using the provided filter.

Parameters:
filter - A filter to use to limit the returned data.
Returns:
An Iterator of Objects found in the repository that match the filter.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

connect

boolean connect(java.lang.String host,
                int port,
                java.lang.String id,
                java.lang.String password,
                java.lang.String base)
                throws ServiceException,
                       java.rmi.RemoteException
Connect a user to a repository. The identity should already be authenticated before connecting.

Parameters:
host - The host DNS name to connect to.
port - The port number the server is listening on.
id - The user id to use to authenticate to the server.
password - The password to use to authenticate.
base - The base location to use as a default to use for operations against the server.
Returns:
true if the connection was successful, false otherwise.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

connectWithProxy

boolean connectWithProxy(java.lang.String host,
                         int port,
                         java.lang.String id,
                         java.lang.String password,
                         java.lang.String base,
                         java.lang.String proxy,
                         boolean isSecure)
                         throws ServiceException,
                                java.rmi.RemoteException
Connect a user to a repository. The identity should already be authenticated before connecting.

Parameters:
host - The host DNS name to connect to.
port - The port number the server is listening on.
id - The user id to use to authenticate to the server.
password - The password to use to authenticate.
base - The base location to use as a default to use for operations against the server.
proxy - A URL for a proxy server to use for the connection.
isSecure - A flag indicating if this is to be a secure connection.
Returns:
true if the connection was successful, false otherwise.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

connect

boolean connect(java.lang.String user,
                java.lang.String password,
                RepositoryDef config)
                throws ServiceException,
                       java.rmi.RemoteException
Connect to a repository using the configuration provided in a RepositoryDef object.

Parameters:
user - The UserId for authentication to the repository server.
password - The password for authentication to the repository server.
config - The RepositoryDef object with the configuration information.
Returns:
true if the connection was successful, false otherwise.
Throws:
ServiceException - If a service level error occurred.
java.rmi.RemoteException - In the event of remote object failure.

deleteEntity

void deleteEntity(MetadataInterface input)
                  throws ServiceException,
                         java.rmi.RemoteException
Delete an entity in the repository.

Parameters:
input - The metadata entity to delete.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

addEntity

void addEntity(MetadataInterface input)
               throws ServiceException,
                      java.rmi.RemoteException
Add an entity to the repository.

Parameters:
input - The metadata entity to add to the repository.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

getUrl

java.lang.String getUrl()
                        throws java.rmi.RemoteException
Get the URL that represents the specific instance for a repository.

Returns:
The URL representing the repository we're currently connected to.
Throws:
java.rmi.RemoteException - in the event of network errors.

getDomain

java.lang.String getDomain()
                           throws java.rmi.RemoteException
Get the domain for this repository. This is set to a generic domain when the object is created, then set to the specific instance after a successful connection.

Returns:
The Authentication domain of the repository. This information can be useful if we have to reconnect, so we can use the correct credentials.
Throws:
java.rmi.RemoteException - in the event of network errors.

setDomain

void setDomain(java.lang.String domain)
               throws java.rmi.RemoteException
Set the string for the security domain this server is running in.

Parameters:
domain - The authentication domain for the server. This information is used to get credentials for reconnecting if necessary.
Throws:
java.rmi.RemoteException - in the event of network errors.

getHost

java.lang.String getHost()
                         throws java.rmi.RemoteException
Get the name of the host this repository is running on.

Returns:
The host name.
Throws:
java.rmi.RemoteException - in the event of network errors.

getPort

int getPort()
            throws java.rmi.RemoteException
Get the port number of the server this repository is using.

Returns:
The port number.
Throws:
java.rmi.RemoteException - in the event of network errors.

getPrincipal

java.lang.String getPrincipal()
                              throws java.rmi.RemoteException
Get the principal name this instance connected with.

Returns:
The principal string.
Throws:
java.rmi.RemoteException - in the event of network errors.

getBase

java.lang.String getBase()
                         throws java.rmi.RemoteException
Get the search base.

Returns:
The default search base for this repository instance.
Throws:
java.rmi.RemoteException - in the event of a network failure.

getTrackedObject

MetadataInterface getTrackedObject(int trackingId)
                                   throws java.rmi.RemoteException
Deprecated. Tracking id usage is no longer supported.

Get a cached object by its tracking ID. Objects in the tracking cache are saved by WeakReference, so they may be garbage collected if no other object is using them. In that case, this method will return null.

Parameters:
trackingId - The id of the desired metadata object.
Returns:
Cached object obtained using its tracking id or null if the object isn't available in the cache.
Throws:
java.rmi.RemoteException - in the event of network errors.

narrow

java.lang.Object narrow(com.sas.services.information.RepositoryData entity)
                        throws ServiceException,
                               java.rmi.RemoteException
Throws:
ServiceException
java.rmi.RemoteException

isEqual

boolean isEqual(java.lang.Object o)
                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

close

void close()
           throws java.rmi.RemoteException
Close the connection and get rid of the cache.

Throws:
java.rmi.RemoteException - in the event of network errors.

addRootFolder

void addRootFolder(FolderInterface folder)
                   throws ServiceException,
                          java.rmi.RemoteException
Make a folder a root folder of this repository. Not all repositories will allow this operation.

Parameters:
folder - The folder to make a root folder.
Throws:
ServiceException - In the event of a repository error.
java.rmi.RemoteException - In the event of remote object failure.

removeRootFolder

FolderInterface removeRootFolder(java.lang.String folderName)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Remove a folder as a root folder for the repository, but don't delete it. If the folder is found and removed, return it;

Parameters:
folderName - The name of the folder to remove as a root.
Returns:
The folder that was removed, if found. Null otherwise.
Throws:
ServiceException - In the event of repository error.
java.rmi.RemoteException - In the event of remote object failure.

makeRootFolder

FolderInterface makeRootFolder(java.lang.String name)
                               throws ServiceException,
                                      java.rmi.RemoteException
Make a root folder in the repository. Root folders are Trees that are associated to the BIP Service SoftwareComponent as a SoftwareTree.

Root folders are uniquely identified by a string name. makeRootFolder will return the FolderInterface to an existing root folder of the same name, if any.

Parameters:
name - The name of the root folder to create.
Returns:
Newly created root folder.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

getRootFolder

FolderInterface getRootFolder(java.lang.String name)
                              throws ServiceException,
                                     java.rmi.RemoteException
Get a root folder in the repository. The name is case-sensitive.

Root folders are uniquely identified by a string name.

Parameters:
name - The name of the root folder to retrieve.
Returns:
Root folder for the specified name.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

getRootFolders

java.util.List getRootFolders()
                              throws ServiceException,
                                     java.rmi.RemoteException
Get all the root folders in the repository. The root folders are Tree objects associated to the Bip Service SoftwareComponent as SoftwareTrees.

Returns:
a List of FolderInterface objects representing the root folders.
Throws:
ServiceException - in the event of repository failures.
java.rmi.RemoteException - in the event of RMI failures.

getObjectByPath

MetadataInterface getObjectByPath(PathUrl url)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get an object in the BIP tree using a PathUrl to find it.

Parameters:
url - The PathUrl that designates the object to retrieve.
Returns:
The object matching the path, or null if none was found.
Throws:
ServiceException - in the event of service object failure
java.rmi.RemoteException - in the event of remote object failure.

getObjectByPath

MetadataInterface getObjectByPath(java.lang.String rootFolderName,
                                  java.lang.String path,
                                  java.lang.Class type)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Deprecated. Use getObjectByPath( String rootFolderName, String path, String type)

Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Parameters:
rootFolderName - The name of the root folder to start the search in.
path - The path to the desired object.
type - The Java class of the desired object.
Returns:
the metadata object matching the provided information.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

getObjectByPath

MetadataInterface getObjectByPath(java.lang.String rootFolderName,
                                  java.lang.String path,
                                  java.lang.String type)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Deprecated. in favor of getObjectByPathString

Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Parameters:
rootFolderName - The name of the root folder to start the search.
path - The path to the desired object, including the name.
type - A String representation of the Java class of the desired object.
Returns:
The metadata object matching the provided parameters.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

getObjectByPathString

MetadataInterface getObjectByPathString(java.lang.String rootFolderName,
                                        java.lang.String path,
                                        java.lang.String type)
                                        throws ServiceException,
                                               java.rmi.RemoteException
Get an object by path.

This method will return an arbitrary matching object if multiple objects exist in the repository. The path is a sequence of names separated by forward slashes. The method must return the same object if called again with the same parameters and the repository has not been modified.

Note: Should we allow relative path names? We could implement a getObjectByPath(FolderInterface currentFolder, String path, Class type) version of this method.

We probably should support "dot" (current folder) and "dot dot" (parent folder) notation in paths, especially if we allow relative paths.

Parameters:
rootFolderName - The name of the root folder to start the search.
path - The path to the desired object, including the name.
type - A String representation of the Java class of the desired object.
Returns:
The metadata object matching the provided parameters.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTree

FilteredFolderInterface searchTree(java.lang.String rootFolderName,
                                   FilterInterface filter)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Parameters:
rootFolderName - Name of the root folder.
filter - A filter to use to limit the returned data.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTree

FilteredFolderInterface searchTree(FolderInterface baseFolder,
                                   FilterInterface filter)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Deprecated. in favor of searchTreeFromBase.

Search the specified folder tree in the repository using the provided filter.

Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTreeFromBase

FilteredFolderInterface searchTreeFromBase(FolderInterface baseFolder,
                                           FilterInterface filter)
                                           throws ServiceException,
                                                  java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

searchTreeFromBaseWithScope

FilteredFolderInterface searchTreeFromBaseWithScope(FolderInterface baseFolder,
                                                    FilterInterface filter,
                                                    int levels)
                                                    throws ServiceException,
                                                           java.rmi.RemoteException
Search the specified folder tree in the repository using the provided filter.

Parameters:
baseFolder - The Folder to start the search in.
filter - A filter to use to limit the returned data.
levels - The number of levels to search.
Returns:
A FilteredFolderInterface containing the objects that match the filter criteria.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

browseSearch

java.util.List browseSearch(FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search the repository, the objects that are returned are not cached, and are in a generic container that is not remotable, doesn't go to the server for data that wasn't originally retrieved, and not persistable. This allows applications that are only displaying basic object information to perform much more lightweight and efficient operations, and only get "real" objects that can be manipulated and persisted when needed.

It's generally a good idea when using this method to use a template. Otherwise, a basic template will be used that will get keywords, but no other associated objects.

Parameters:
filter - A Filter to limit the objects returned to those the client is interested in. The Filter also allows the user to specify a template and a set of flags that can be used to control the returned data set with very fine granularity.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseFetch

BrowseMetadataInterface browseFetch(java.lang.String entityKey,
                                    FilterInterface filter)
                                    throws ServiceException,
                                           java.rmi.RemoteException
Fetch a single object from the repository using the key. A template can be supplied that will pull in other objects that are interesting when viewing the one requested. If no template is provided, All of the object's simple attributes and immediate associations are retrieved.

Parameters:
entityKey - The Information Services entity key, or the repository key of the object desired.
filter - A Filter that can provide a template, flags, or other controls to help return the correct set of results.
Returns:
A BrowseMetadataInterface object with the requested information.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseFolder

java.util.List browseFolder(java.lang.String folderISEntityKey,
                            FilterInterface filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Get information about a specific folder. If a filter is provided, it's applied to the members of the folder, and the matching members are returned in the result List. If no filter is specified (it's null or no filter information is provided), all of the members and subfolders are retrieved and returned as BrowseMetadataInterface objects in the result List.

If what you want is a complete set of information about a specific folder, you may want to consider using the browseFetch method instead of browseFolder, using an appropriate template.

Parameters:
folderISEntityKey - The Information Service entity key of the Folder to retrieve information for.
filter - A Filter used to limit the items returned.
Returns:
A List of BrowseMetadataInterface objects. These will be either the matching members, if a filter is provided, or all the members and subfolders if no filter is provided.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

browseFolderRecursive

java.util.List browseFolderRecursive(java.lang.String folderISEntityKey,
                                     FilterInterface filter)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Search a folder tree recursively using the filter. If the filter is provided, the members of all the trees from the one specified, through all of its subordinates will be searched and the matching objects will be returned in the results List. If no filter is specified, all the members and subfolders of the requested folder will be returned in the result List, with their members and subfolders included in their Maps. This is potentially a very expensive operation, so use it cautiously.

Parameters:
folderISEntityKey - The Entity key of the requested folder.
filter - A Filter to limit the results.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

browseObjectByPath

BrowseMetadataInterface browseObjectByPath(PathUrl pathurl,
                                           FilterInterface filter)
                                           throws ServiceException,
                                                  java.rmi.RemoteException
Retrieve an object based on its PathUrl.

See the repository specific classes for special considerations.

Parameters:
pathurl - A PathUrl object that represents the object to be retrieved.
filter - Filter used to pass template and flag information to the retrieval code.
Returns:
A BrowseMetadataInterface with the requested object, or null if it couldn't be located.
Throws:
ServiceException - If a repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

addListener

void addListener(RepositoryListenerInterface listener)
                 throws ServiceException,
                        java.rmi.RemoteException
Add a listener to receive event notifications from the repository instance. Events include disconnect, reconnect, and close. Other events may be added.

Parameters:
listener - The object to add to the repository's list of event listeners.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

removeListener

void removeListener(RepositoryListenerInterface listener)
                    throws ServiceException,
                           java.rmi.RemoteException
Remove a listener from the list of active event listeners for this repository.

Parameters:
listener - The object to remove from the repository's list of event listeners.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

refreshEntity

void refreshEntity(MetadataInterface mi)
                   throws ServiceException,
                          java.rmi.RemoteException
Refresh an entity from the data in the server.

Parameters:
mi - The metadata object whose data needs refreshing.
Throws:
java.rmi.RemoteException - in the event of network errors.
ServiceException - if a repository error occurs.

newChild

ChildRepositoryInterface newChild()
                                  throws ServiceException,
                                         java.rmi.RemoteException
Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.

Returns:
A new object of type ChildRepositoryInterface.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of remote object failure.

getUniqueId

java.lang.String getUniqueId()
                             throws java.rmi.RemoteException
Get a unique identifier for this repository instance.

Returns:
A unique identifier.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

factoryProcess

MetadataInterface factoryProcess(java.lang.Object o)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Process a raw repository object into a smart object. Going through the repository rather than directly against the Factory allows for better cache control.

Parameters:
o - The repository object that needs to be processed into a smart object.
Returns:
The smart object representation of the repository entity.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

isDestroyed

boolean isDestroyed()
                    throws java.rmi.RemoteException
Check if the repostiory instance has been closed.

Returns:
true if the repository has been closed, false otherwise.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

toByteArray

byte[] toByteArray()
                   throws java.rmi.RemoteException,
                          ServiceException
Write the current state of the repository to a byte array.

Returns:
The byte array containing the current repository state.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

fromByteArry

void fromByteArry(UserContextInterface uci,
                  byte[] data)
                  throws java.rmi.RemoteException,
                         ServiceException
Initialize an instance of a repository from state saved in a byte array.

Parameters:
uci - A UserContext to use to get credentials and other information.
data - The data array with the repository state.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getCacheStatistics

com.sas.services.cache.CacheStatistics getCacheStatistics()
                                                          throws java.rmi.RemoteException,
                                                                 ServiceException
Get the cache statistics for the repository cache.

Returns:
A CacheStatistics object.
Throws:
ServiceException - If a factory error or repository error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getFactoryKey

java.lang.String getFactoryKey(java.lang.Object o)
                               throws java.rmi.RemoteException,
                                      ServiceException
Get the factory key for objects from this repository. This method should only be used internally to the Information Service.

Parameters:
o - The object to return the factory key for.
Returns:
The factory key string for this object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a service level error occurs.

produceDefaultMetadata

MetadataInterface produceDefaultMetadata(java.lang.Object o)
                                         throws java.rmi.RemoteException,
                                                ServiceException
Return the default metadata object for this repository. Some repository instances return a Metadata, others a Folder, others subclasses of those. This method should only be used internally by the Information Service.

Parameters:
o - The data layer object to return a default smart object for.
Returns:
A default smart object for this repository, and the provided data layer object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a repository or service level error occurs.

factoryTest

boolean factoryTest(java.lang.Object testObject,
                    java.lang.String filterString)
                    throws java.rmi.RemoteException,
                           ServiceException
Test an object against a Factory filter. Return true if the filter string matches, false otherwise.

Parameters:
testObject - The data layer object to test.
filterString - The Factory filter string.
Returns:
true if the test object matches the filter string, false otherwise.
Throws:
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If a repository or service level error occurs.

isProfileRepository

int isProfileRepository(java.lang.String url)
                        throws java.rmi.RemoteException
Returns true if this repository supports profile storage.

Parameters:
url - The URL of the configured repository. This may be null.
Returns:
One of the defined values PROFILE_NO, PROFILE_POSSIBLE, or PROFILE_BEST.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getEvaluator

com.sas.services.information.rules.EvaluatorInterface getEvaluator(java.lang.Object o)
                                                                   throws java.rmi.RemoteException
This method is used by the Factory to get an evaluator that will evaluate factory rules against an object's data to determine if it matches the rule.

Parameters:
o - The object to test against the rule.
Returns:
A new evaluator for this object.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getServer

ServerInterface getServer()
                          throws ServiceException,
                                 java.rmi.RemoteException
Get the ServerInterface that controls this repository. For repositories that do not have servers, this may return null.

Returns:
The ServerInterface that controls this repository.
Throws:
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.

refreshAllData

void refreshAllData()
                    throws ServiceException,
                           java.rmi.RemoteException
Refresh all of the data that's in the cache.

Throws:
ServiceException - If a repository error occurs during the refresh.
java.rmi.RemoteException - In the event of remote object failure.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.