Interface RepositoryInterface
- All Superinterfaces:
Remote
- All Known Subinterfaces:
ChildRepositoryInterface,DAVRepositoryInterface,MetadataRepositoryInterface,OMIRepositoryInterface
- All Known Implementing Classes:
AbstractRepository2,DAVChildRepository,DAVRepository,OMIServerChildRepository,OMIServerRepository
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntity(MetadataInterface input) Add an entity to the repository.voidaddListener(RepositoryListenerInterface listener) Add a listener to receive event notifications from the repository instance.voidaddRootFolder(FolderInterface folder) Make a folder a root folder of this repository.browseFetch(String entityKey, FilterInterface filter) Fetch a single object from the repository using the key.ListbrowseFolder(String folderISEntityKey, FilterInterface filter) Get information about a specific folder.ListbrowseFolderRecursive(String folderISEntityKey, FilterInterface filter) Search a folder tree recursively using the filter.browseObjectByPath(PathUrl pathurl, FilterInterface filter) Retrieve an object based on its PathUrl.ListbrowseSearch(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.voidclose()Close the connection and get rid of the cache.booleanconnect(String host, int port, String id, String password, String base) Connect a user to a repository.booleanconnect(String user, String password, RepositoryDef config) Connect to a repository using the configuration provided in a RepositoryDef object.booleanconnectWithProxy(String host, int port, String id, String password, String base, String proxy, boolean isSecure) Connect a user to a repository.voiddeleteEntity(MetadataInterface input) Delete an entity in the repository.factoryProcess(Object o) Process a raw repository object into a smart object.booleanfactoryTest(Object testObject, String filterString) Test an object against a Factory filter.fetch(String repositoryKey) Fetch an object from the repository given the repository key.fetch(String repositoryKey, boolean bypassCache) Fetch an object from the repository given the repository key.fetchByUrl(String entityURL, boolean bypassCache) Fetch an object from the repository given the URL.voidfromByteArry(UserContextInterface uci, byte[] data) Initialize an instance of a repository from state saved in a byte array.StringgetBase()Get the search base.com.sas.services.cache.CacheStatisticsGet the cache statistics for the repository cache.StringGet the domain for this repository.EvaluatorInterfacegetEvaluator(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.StringgetFactoryKey(Object o) Get the factory key for objects from this repository.StringgetHost()Get the name of the host this repository is running on.Get the authenticated user identity.StringGet the Information Service configuration name for this repository if it exists.getObjectByPath(PathUrl url) Get an object in the BIP tree using a PathUrl to find it.getObjectByPath(String rootFolderName, String path, Class type) Deprecated.Use getObjectByPath( String rootFolderName, String path, String type)getObjectByPath(String rootFolderName, String path, String type) Deprecated.in favor of getObjectByPathStringgetObjectByPathString(String rootFolderName, String path, String type) Get an object by path.intgetPort()Get the port number of the server this repository is using.StringGet the principal name this instance connected with.getRootFolder(String name) Get a root folder in the repository.ListGet all the root folders in the repository.Get the ServerInterface that controls this repository.getTrackedObject(int trackingId) Deprecated.Tracking id usage is no longer supported.StringGet a unique identifier for this repository instance.StringgetUrl()Get the URL that represents the specific instance for a repository.getUser()Get the person entity that represents the user that is connected to the repository.Get the UserContext this repository was connected for.booleanCheck if the repostiory instance has been closed.booleanisEqual(Object o) intisProfileRepository(String url) Returns true if this repository supports profile storage.makeRootFolder(String name) Make a root folder in the repository.Objectnarrow(RepositoryData entity) newChild()Create a child repository instance with its own cache, which can be used to perform a group of updates transaction-style.newMetadata(MetadataInterface model, String name) Deprecated.in favor of newMetadataByModel.newMetadata(String reposId, String name, String type) Create a new metadata entity.newMetadataByModel(MetadataInterface model, String name) Create a new metadata entity.produceDefaultMetadata(Object o) Return the default metadata object for this repository.voidRefresh all of the data that's in the cache.voidRefresh an entity from the data in the server.voidremoveListener(RepositoryListenerInterface listener) Remove a listener from the list of active event listeners for this repository.removeRootFolder(String folderName) Remove a folder as a root folder for the repository, but don't delete it.Listsearch(FilterInterface filter) Search the repository using the provided filter.searchTree(FolderInterface baseFolder, FilterInterface filter) Deprecated.in favor of searchTreeFromBase.searchTree(String rootFolderName, FilterInterface filter) Search the specified folder tree in the repository using the provided filter.searchTreeFromBase(FolderInterface baseFolder, FilterInterface filter) Search the specified folder tree in the repository using the provided filter.searchTreeFromBaseWithScope(FolderInterface baseFolder, FilterInterface filter, int levels) Search the specified folder tree in the repository using the provided filter.voidsetDomain(String domain) Set the string for the security domain this server is running in.voidsetISName(String name) Set the name that was used to connect to the repository.voidsetUser(PersonInterface person) Deprecated.This is not referenced outside platform services, and shouldn't be called by a client.voidSet the UserContext that this repository belongs to.byte[]Write the current state of the repository to a byte array.
-
Field Details
-
PROFILE_NO
static final int PROFILE_NO- See Also:
-
PROFILE_POSSIBLE
static final int PROFILE_POSSIBLE- See Also:
-
PROFILE_BEST
static final int PROFILE_BEST- See Also:
-
-
Method Details
-
setISName
void setISName(String name) throws 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:
RemoteException
-
getISName
String getISName() throws RemoteExceptionGet 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:
RemoteException- in the event of remote object failure.
-
setUserContext
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:
RemoteException- In the event of network failure.
-
getUserContext
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:
RemoteException- in the event of network failure.
-
setUser
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:
IllegalStateException- if called when the person has already been set.RemoteException- in the event of remote access errors.
-
getUser
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:
RemoteException- in the event of remote access errors.
-
getIdentity
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.RemoteException- In the event of remote object failure.
-
newMetadata
MetadataInterface newMetadata(String reposId, String name, String type) throws ServiceException, 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.RemoteException- in the event of a network error.
-
newMetadata
MetadataInterface newMetadata(MetadataInterface model, String name) throws ServiceException, 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.RemoteException- in the event of a network error.
-
newMetadataByModel
MetadataInterface newMetadataByModel(MetadataInterface model, String name) throws ServiceException, 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.RemoteException- in the event of a network error.
-
fetch
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
fetchByUrl
MetadataInterface fetchByUrl(String entityURL, boolean bypassCache) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
fetch
MetadataInterface fetch(String repositoryKey, boolean bypassCache) throws ServiceException, RemoteException Fetch an object from the repository given the repository key. If thebypassCacheflag 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 thefetchmethod.- 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
search
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
connect
boolean connect(String host, int port, String id, String password, String base) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
connectWithProxy
boolean connectWithProxy(String host, int port, String id, String password, String base, String proxy, boolean isSecure) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
connect
boolean connect(String user, String password, RepositoryDef config) throws ServiceException, 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- TheRepositoryDefobject with the configuration information.- Returns:
- true if the connection was successful, false otherwise.
- Throws:
ServiceException- If a service level error occurred.RemoteException- In the event of remote object failure.
-
deleteEntity
Delete an entity in the repository.- Parameters:
input- The metadata entity to delete.- Throws:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
addEntity
Add an entity to the repository.- Parameters:
input- The metadata entity to add to the repository.- Throws:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
getUrl
String getUrl() throws RemoteExceptionGet the URL that represents the specific instance for a repository.- Returns:
- The URL representing the repository we're currently connected to.
- Throws:
RemoteException- in the event of network errors.
-
getDomain
String getDomain() throws RemoteExceptionGet 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:
RemoteException- in the event of network errors.
-
setDomain
void setDomain(String domain) throws 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:
RemoteException- in the event of network errors.
-
getHost
String getHost() throws RemoteExceptionGet the name of the host this repository is running on.- Returns:
- The host name.
- Throws:
RemoteException- in the event of network errors.
-
getPort
int getPort() throws RemoteExceptionGet the port number of the server this repository is using.- Returns:
- The port number.
- Throws:
RemoteException- in the event of network errors.
-
getPrincipal
String getPrincipal() throws RemoteExceptionGet the principal name this instance connected with.- Returns:
- The principal string.
- Throws:
RemoteException- in the event of network errors.
-
getBase
String getBase() throws RemoteExceptionGet the search base.- Returns:
- The default search base for this repository instance.
- Throws:
RemoteException- in the event of a network failure.
-
getTrackedObject
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
nullif the object isn't available in the cache. - Throws:
RemoteException- in the event of network errors.
-
narrow
- Throws:
ServiceExceptionRemoteException
-
isEqual
boolean isEqual(Object o) throws RemoteException - Throws:
RemoteException
-
close
void close() throws RemoteExceptionClose the connection and get rid of the cache.- Throws:
RemoteException- in the event of network errors.
-
addRootFolder
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.RemoteException- In the event of remote object failure.
-
removeRootFolder
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.RemoteException- In the event of remote object failure.
-
makeRootFolder
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
getRootFolder
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
getRootFolders
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.RemoteException- in the event of RMI failures.
-
getObjectByPath
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 failureRemoteException- in the event of remote object failure.
-
getObjectByPath
MetadataInterface getObjectByPath(String rootFolderName, String path, Class type) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
getObjectByPath
MetadataInterface getObjectByPath(String rootFolderName, String path, String type) throws ServiceException, RemoteException Deprecated.in favor of getObjectByPathStringGet 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
getObjectByPathString
MetadataInterface getObjectByPathString(String rootFolderName, String path, String type) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
searchTree
FilteredFolderInterface searchTree(String rootFolderName, FilterInterface filter) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
searchTree
FilteredFolderInterface searchTree(FolderInterface baseFolder, FilterInterface filter) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
searchTreeFromBase
FilteredFolderInterface searchTreeFromBase(FolderInterface baseFolder, FilterInterface filter) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
searchTreeFromBaseWithScope
FilteredFolderInterface searchTreeFromBaseWithScope(FolderInterface baseFolder, FilterInterface filter, int levels) throws ServiceException, 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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
browseSearch
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- AFilterto 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
BrowseMetadataInterfaceobjects. - Throws:
ServiceException- In the event of repository errors.RemoteException- In the event of remote object failure.
-
browseFetch
BrowseMetadataInterface browseFetch(String entityKey, FilterInterface filter) throws ServiceException, 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- AFilterthat can provide a template, flags, or other controls to help return the correct set of results.- Returns:
- A
BrowseMetadataInterfaceobject with the requested information. - Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
browseFolder
List browseFolder(String folderISEntityKey, FilterInterface filter) throws ServiceException, 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- AFilterused to limit the items returned.- Returns:
- A List of
BrowseMetadataInterfaceobjects. 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.RemoteException- in the event of remote object failure.
-
browseFolderRecursive
List browseFolderRecursive(String folderISEntityKey, FilterInterface filter) throws ServiceException, 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- AFilterto limit the results.- Returns:
- A List of
BrowseMetadataInterfaceobjects. - Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
browseObjectByPath
BrowseMetadataInterface browseObjectByPath(PathUrl pathurl, FilterInterface filter) throws ServiceException, 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-Filterused to pass template and flag information to the retrieval code.- Returns:
- A
BrowseMetadataInterfacewith the requested object, or null if it couldn't be located. - Throws:
ServiceException- If a repository error occurs.RemoteException- In the event of remote object failure.
-
addListener
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
removeListener
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:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
refreshEntity
Refresh an entity from the data in the server.- Parameters:
mi- The metadata object whose data needs refreshing.- Throws:
RemoteException- in the event of network errors.ServiceException- if a repository error occurs.
-
newChild
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.RemoteException- in the event of remote object failure.
-
getUniqueId
String getUniqueId() throws RemoteExceptionGet a unique identifier for this repository instance.- Returns:
- A unique identifier.
- Throws:
RemoteException- In the event of remote object failure.
-
factoryProcess
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.RemoteException- In the event of remote object failure.
-
isDestroyed
boolean isDestroyed() throws RemoteExceptionCheck if the repostiory instance has been closed.- Returns:
- true if the repository has been closed, false otherwise.
- Throws:
RemoteException- In the event of remote object failure.
-
toByteArray
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.RemoteException- In the event of remote object failure.
-
fromByteArry
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.RemoteException- In the event of remote object failure.
-
getCacheStatistics
com.sas.services.cache.CacheStatistics getCacheStatistics() throws RemoteException, ServiceExceptionGet the cache statistics for the repository cache.- Returns:
- A CacheStatistics object.
- Throws:
ServiceException- If a factory error or repository error occurs.RemoteException- In the event of remote object failure.
-
getFactoryKey
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:
RemoteException- In the event of remote object failure.ServiceException- If a service level error occurs.
-
produceDefaultMetadata
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:
RemoteException- In the event of remote object failure.ServiceException- If a repository or service level error occurs.
-
factoryTest
boolean factoryTest(Object testObject, String filterString) throws 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:
RemoteException- In the event of remote object failure.ServiceException- If a repository or service level error occurs.
-
isProfileRepository
int isProfileRepository(String url) throws 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:
RemoteException- In the event of remote object failure.
-
getEvaluator
EvaluatorInterface getEvaluator(Object o) throws 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:
RemoteException- In the event of remote object failure.
-
getServer
Get the ServerInterface that controls this repository. For repositories that do not have servers, this may return null.- Returns:
- The
ServerInterfacethat controls this repository. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
refreshAllData
Refresh all of the data that's in the cache.- Throws:
ServiceException- If a repository error occurs during the refresh.RemoteException- In the event of remote object failure.
-