***  This interface provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.information
Interface InformationServiceInterface

All Superinterfaces:
com.sas.entities.EntityKeyInterface, java.rmi.Remote, RemoteServiceInterface, ServiceNotificationBroadcasterInterface
All Known Implementing Classes:
InformationService

public interface InformationServiceInterface
extends RemoteServiceInterface

The InformationService handles finding repositories, connecting a user context to suitable repositories for the identities it contains, and trans-repository searching.

Since:
1.0

Field Summary
static int OPTION_CACHE_TYPE_DEFINITIONS
          The setOption option parameter for setting whether type definitions should be cached.
static int OPTION_FOLDER_ITEM_REFRESH_MSEC
          the setOption option parameter for setting the folder item refresh interval in milliseconds.
static int OPTION_FOLDER_SUBFOLDER_REFRESH_MSEC
          The setOption option parameter for setting the Folder subfolder refresh interval in milliseconds.
static int OPTION_METADATA_TREE_REFRESH_MSEC
          The setOption option parameter for setting the tree refresh interval for the Metadata class in milliseconds.
 
Fields inherited from interface com.sas.services.RemoteServiceInterface
CLASS_IDENTIFIER, CLASS_IDENTIFIER_1_1, CLASS_IDENTIFIER_1_2, CLASS_IDENTIFIER_SERVICE_TYPE, CLASS_IDENTIFIER_SERVICE_TYPE_1_1, CLASS_IDENTIFIER_SERVICE_TYPE_1_2
 
Method Summary
 void addExplicitIdentityGroupsMap(java.lang.String serverUrl, java.util.Map ExplicitIdentityGroupsMap)
          Cache a type map for a given server.
 void addInformationServiceTimerClient(com.sas.services.information.InformationServiceTimerClient client)
          Add a client object to be triggered when the timer expires.
 void addMetadataChangeListener(MetadataChangeListener listener, java.lang.String url)
          Register a metadata change listener.
 boolean addRepositoryDef(RepositoryDef repositoryDef)
          Adds a repository definition to the repository list.
 boolean addRepositoryGroup(RepositoryGroup group)
          Add a new group to the collection of defined repository groups that can be used to scope a search.
 boolean addServerDef(ServerDef serverDef)
          Add a new server definition to the Information Service configuration.
 void addTypeMap(java.lang.String serverUrl, java.util.Map typeMap)
          Cache a type map for a given server.
 java.util.List browseSearch(UserContextInterface user, Filter filter)
          Search the user's connected repositories.
 java.util.List browseSearchGroupName(UserContextInterface user, java.lang.String groupName, Filter filter)
          Search the repository group for the user.
 java.util.List browseSearchGroupNameWithFilterArray(UserContextInterface user, java.lang.String groupName, Filter[] filters)
          Search the repository group for the user.
 java.util.List browseSearchProtocols(UserContextInterface user, java.util.List protocols, Filter filter)
          Search the user's connected repositories.
 java.util.List browseSearchProtocolsWithFilterArray(UserContextInterface user, java.util.List protocols, Filter[] filters)
          Search the user's connected repositories.
 java.util.List browseSearchWithFilterArray(UserContextInterface user, Filter[] filters)
          Search the user's connected repositories.
 void clearRepositoryDefs()
          Removes all repository definitions.
 void clearRepositoryGroups()
          Clear all repository group definitions.
 void clearServerDefs()
          Clear the set of defined server definitions.
 RepositoryInterface connect(UserContextInterface user, RepositoryDef reposDef)
          Connect to the repository specified in the repository definition.
 ServerInterface connect(UserContextInterface user, ServerDef serverDef)
          Connect to a ServerInterface object.
 void connectAuto(UserContextInterface user)
          Connect to all repositories that have been predefined as auto-connect repositories.
 RepositoryInterface connectByName(UserContextInterface user, java.lang.String name)
          Connect to a preconfigured repository.
 MetadataInterface fetchEntityByKey(UserContextInterface user, java.lang.String key)
          Fetch an entity from a repository based on the entity key.
 MetadataInterface fetchEntityByKey(UserContextInterface user, java.lang.String key, boolean bypassCache)
          Fetch an entity from a repository based on the entity key.
 MetadataInterface fetchEntityByUrl(UserContextInterface user, java.lang.String url, java.lang.String domain)
          Fetch an entity from a repository based on the url.
 MetadataInterface fetchEntityByUrl(UserContextInterface user, java.lang.String url, java.lang.String domain, boolean bypassCache)
          Fetch an entity from a repository based on the url.
 java.util.List findServers(UserContextInterface user)
          This method searches the connected metadata stores for server definitions that can participate in the Information Service as repositories.
 java.util.Map getExplicitIdentityGroupsMap(java.lang.String serverUrl)
          Get an Explicit IdentityGroups map for a given server.
 java.util.HashMap getFactoryConfig()
          Return the configuration information for the Factory.
 MetadataInterface getObjectByPath(UserContextInterface user, PathUrl path)
          Retrieve an object using the PathUrl.
 java.lang.Object getOption(int option)
          Get an option value from the InformationService or its components.
 java.util.List getReposDefs()
          Return a List of the preconfigured repository definitions.
 RepositoryGroup getRepositoryGroup(java.lang.String name)
          Get the group with the given name.
 java.util.List getRepositoryGroups()
          Return a List of the defined repository groups.
 java.lang.String getRepositoryUrl(java.lang.String name)
          Get the URL for a repository definition by name.
 java.lang.String getReposKey(java.lang.String entityKey)
          This is a utility method to take an entity key and return the repository key.
 java.util.List getServerDefs()
          Returns a List of the configured server definitions.
 ServerInterface getServerForPath(UserContextInterface user, PathUrl path)
          Return the ServerInterface for the path given.
 java.util.Map getSmartObjectDefinitions()
          Get the Map of Smart object definitions from the configuration.
 MetadataInterface getTrackedObject(UserContextInterface user, int trackingId)
          Fetch an item based on its tracking ID number.
 java.util.Map getTypeMap(java.lang.String serverUrl)
          Get a type definition map for a given server.
 boolean isAuthorized(UserContextInterface superUser, IdentityInterface plainUser, MetadataInterface objectToCheck, java.lang.String permission)
          Check the authorization for a metadata object.
 boolean isIsolated()
          Get the flag that indicates if metadata isolation is active.
 void metadataChange(MetadataChangeEvent event)
          Process a metadata change event.
 MetadataInterface newMetadata(java.lang.String reposId, java.lang.String name, RepositoryInterface repos, java.lang.String type)
          Create a new metadata entity.
 MetadataInterface newMetadata913(java.lang.String reposId, java.lang.String name, RepositoryInterface repos, java.lang.String type)
          Create a new metadata entity.
 MetadataInterface newMetadataByModel(MetadataInterface model, java.lang.String name)
          Create a new metadata entity.
 MetadataInterface newMetadataInFolder(FolderInterface folder, RepositoryInterface repos, java.lang.String type, java.lang.String name)
          Create a new Metadata entity.
 void removeInformationServiceTimerClient(com.sas.services.information.InformationServiceTimerClient client)
          Remove a timer client from the service list.
 void removeMetadataChangeListener(MetadataChangeListener listener, java.lang.String url)
          Remove a metadata change listener.
 boolean removeRepositoryDef(RepositoryDef repositoryDef)
          Removes a repository definition from the list of repositories.
 boolean removeRepositoryGroup(RepositoryGroup group)
          Remove a group from the collection of defined repository groups that can be used to scope a search.
 boolean removeServerDef(ServerDef serverDef)
          Remove a server definition from the Information Service configuration.
 java.util.List search(UserContextInterface user, FilterInterface filter)
          Search all the repositories that a user is connected to.
 java.util.List searchFilterArray(UserContextInterface user, FilterInterface[] filters)
          Perform a search in all the repositories the user is connected to using the provided Filters.
 java.util.List searchGroup(UserContextInterface user, RepositoryGroup group, FilterInterface filter)
          Search the repository group that is provided.
 java.util.List searchGroupName(UserContextInterface user, java.lang.String groupName, FilterInterface filter)
          Search the repository group with the given name.
 java.util.List searchGroupNameWithFilterArray(UserContextInterface user, java.lang.String groupName, FilterInterface[] filterArray)
          Search the repository group that is provided.
 java.util.List searchGroupWithFilterArray(UserContextInterface user, RepositoryGroup group, FilterInterface[] filterArray)
          Search the repository group that is provided.
 java.util.List searchProtocols(UserContextInterface user, java.util.List protocols, FilterInterface filter)
          Perform a search in the repositories the user is connected to which match the domains in the provided Vector, using the provided Filter.
 java.util.List searchProtocolsWithFilterArray(UserContextInterface user, java.util.List protocols, FilterInterface[] filters)
          Perform a search in the repositories the user is connected to which match the domains in the provided Vector, using the provided Filter.
 java.util.List searchTree(UserContextInterface user, FilterInterface filter)
          Search the repositories that the user is connected to, returning the results in a navigable folder structure.
 void setIsolated()
          Set the service to isolate data retrieved from the metadata servers.
 void setOption(int option, java.lang.Object o)
          Set an option on the InformationService or its components.
 
Methods inherited from interface com.sas.services.RemoteServiceInterface
configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceProxy, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState
 
Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver
 

Field Detail

OPTION_METADATA_TREE_REFRESH_MSEC

static final int OPTION_METADATA_TREE_REFRESH_MSEC
The setOption option parameter for setting the tree refresh interval for the Metadata class in milliseconds. The value for this option should be an Integer.

See Also:
Constant Field Values

OPTION_FOLDER_ITEM_REFRESH_MSEC

static final int OPTION_FOLDER_ITEM_REFRESH_MSEC
the setOption option parameter for setting the folder item refresh interval in milliseconds. The value for this options should be an Integer.

See Also:
Constant Field Values

OPTION_FOLDER_SUBFOLDER_REFRESH_MSEC

static final int OPTION_FOLDER_SUBFOLDER_REFRESH_MSEC
The setOption option parameter for setting the Folder subfolder refresh interval in milliseconds. The value for this option should be an Integer.

See Also:
Constant Field Values

OPTION_CACHE_TYPE_DEFINITIONS

static final int OPTION_CACHE_TYPE_DEFINITIONS
The setOption option parameter for setting whether type definitions should be cached. This doesn't stop the OMIServer from trying, but the Information Service will ignore the request. The value should be an Boolean (true=cache, false=no cache). Initial setting will always be true

See Also:
Constant Field Values
Method Detail

setOption

void setOption(int option,
               java.lang.Object o)
               throws java.lang.IllegalArgumentException,
                      ServiceException,
                      java.rmi.RemoteException
Set an option on the InformationService or its components.

Parameters:
option - The code for the option you want to set.
o - The new value for the option. The type is dependent on the option. For simple types (int, boolean, etc.), use the object equivalent (Integer, Boolean, etc).
Throws:
java.lang.IllegalArgumentException - Thrown if the argument type isn't correct for the option specified.
ServiceException - In the event that an error occurs while setting the option.
java.rmi.RemoteException - In the event of remote object failure.

getOption

java.lang.Object getOption(int option)
                           throws java.lang.IllegalArgumentException,
                                  ServiceException,
                                  java.rmi.RemoteException
Get an option value from the InformationService or its components.

Parameters:
option - The code for the option you want to get.
Returns:
The value for the option. The type of the object returned depends on the option requested. See the javadoc for the option to determine the type for that option.
Throws:
java.lang.IllegalArgumentException - If the option specified isn't a valid option.
ServiceException - In the event an error occurs while getting the option value.
java.rmi.RemoteException - In the event of remote object failure.

getRepositoryUrl

java.lang.String getRepositoryUrl(java.lang.String name)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Get the URL for a repository definition by name. The repository has to be in the Information Service configuration, or a null will be returned.

Parameters:
name - The name of the repository to get the URL for.
Returns:
The repository URL, or null if the name is undefined.
Throws:
ServiceException - in the event of a service failure.
java.rmi.RemoteException - in the event of network failure.

findServers

java.util.List findServers(UserContextInterface user)
                           throws ServiceException,
                                  java.rmi.RemoteException
This method searches the connected metadata stores for server definitions that can participate in the Information Service as repositories. There's no guarantee that the user will have a credential set appropriate to all the servers.

Parameters:
user - The user context for the user performing the search
Returns:
An Iterator containing RepositoryDef objects for all the servers found.
Throws:
ServiceException - in the event of a service object failure.
java.rmi.RemoteException - if a network anomaly is encountered.

getTrackedObject

MetadataInterface getTrackedObject(UserContextInterface user,
                                   int trackingId)
                                   throws java.rmi.RemoteException
Fetch an item based on its tracking ID number. This goes through the repositories in the UserContext and checks each one for the item. If it's not found, the method returns null.

Parameters:
user - The UserContext to find the object for.
trackingId - The tracking number of the object to return.
Returns:
A MetadataInterface object matching the tracking number, or null if it wasn't found in any of the repositories.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

fetchEntityByKey

MetadataInterface fetchEntityByKey(UserContextInterface user,
                                   java.lang.String key)
                                   throws java.rmi.RemoteException,
                                          ServiceException
Fetch an entity from a repository based on the entity key. The method goes through the repository handles in the UserContext looking for one that matches the URL in the key. If it finds the right one, it uses the repository to fetch the item. If no connection to the server exists, it will try to find a server definition that matches and connect to it. If that fails, it will try to use the information in the entity key to establish a connection to a server. If everything fails, it returns null.

Parameters:
user - The UserContext to use to fetch the object.
key - The entity key to fetch.
Returns:
A MetadataInterface object or null if the key wasn't found.
Throws:
ServiceException - in the event of service object failure.
java.rmi.RemoteException - in the event of remote object failure.

fetchEntityByKey

MetadataInterface fetchEntityByKey(UserContextInterface user,
                                   java.lang.String key,
                                   boolean bypassCache)
                                   throws java.rmi.RemoteException,
                                          ServiceException
Fetch an entity from a repository based on the entity key. The method goes through the repository handles in the UserContext looking for one that matches the URL in the key. If it finds the right one, it uses the repository to fetch the item. If no connection to the server exists, it will try to find a server definition that matches and connect to it. If that fails, it will try to use the information in the entity key to establish a connection to a server. If everything fails, it returns null.

Parameters:
user - The UserContext to use to fetch the object.
key - The entity key to fetch.
bypassCache - If true, the repository cache will be bypassed and a trip to the server forced.
Returns:
A MetadataInterface object or null if the key wasn't found.
Throws:
ServiceException - in the event of service object failure.
java.rmi.RemoteException - in the event of remote object failure.

fetchEntityByUrl

MetadataInterface fetchEntityByUrl(UserContextInterface user,
                                   java.lang.String url,
                                   java.lang.String domain)
                                   throws java.rmi.RemoteException,
                                          ServiceException
Fetch an entity from a repository based on the url. The method goes through the repository handles in the UserContext looking for one that matches the URL. If it finds the right one, it uses the repository to fetch the item. If no connection to the server exists, it will try to find a server definition that matches and connect to it. If that fails, it will try to use the information in the entity key to establish a connection to a server. If everything fails, it returns null.

Parameters:
user - The UserContext to use to fetch the object.
url - The url of the object to fetch.
domain - An optional domain to help establish a connection, if one doesn't already exist to the server.
Returns:
A MetadataInterface object or null if the key wasn't found.
Throws:
ServiceException - in the event of service object failure.
java.rmi.RemoteException - in the event of remote object failure.

fetchEntityByUrl

MetadataInterface fetchEntityByUrl(UserContextInterface user,
                                   java.lang.String url,
                                   java.lang.String domain,
                                   boolean bypassCache)
                                   throws java.rmi.RemoteException,
                                          ServiceException
Fetch an entity from a repository based on the url. The method goes through the repository handles in the UserContext looking for one that matches the URL. If it finds the right one, it uses the repository to fetch the item. If no connection to the server exists, it will try to find a server definition that matches and connect to it. If that fails, it will try to use the information in the entity key to establish a connection to a server. If everything fails, it returns null.

Parameters:
user - The UserContext to use to fetch the object.
url - The url of the object to fetch.
domain - An optional domain to help establish a connection, if one doesn't already exist to the server.
bypassCache - If true, the repository cache will be bypassed and a trip to the server forced.
Returns:
A MetadataInterface object or null if the key wasn't found.
Throws:
ServiceException - in the event of service object failure.
java.rmi.RemoteException - in the event of remote object failure.

newMetadataInFolder

MetadataInterface newMetadataInFolder(FolderInterface folder,
                                      RepositoryInterface repos,
                                      java.lang.String type,
                                      java.lang.String name)
                                      throws ServiceException,
                                             java.rmi.RemoteException
Create a new Metadata entity. The metadata will be child of the folder passed in. Some repositories will require this (LDAP), while with others it may be optional (OMR).

Parameters:
folder - The parent folder of the new object.
repos - The repository in which the new object will reside.
type - The "smart object" type string of the object.
name - The name of the new object.
Returns:
A new MetadataInterface subclass for the new object.
Throws:
ServiceException - if there's no configuration defined for the type that was passed in, or if a repository error occurred.
java.rmi.RemoteException - in the event of remote object failure.

newMetadata913

MetadataInterface newMetadata913(java.lang.String reposId,
                                 java.lang.String name,
                                 RepositoryInterface repos,
                                 java.lang.String type)
                                 throws java.rmi.RemoteException,
                                        ServiceException
Create a new metadata entity. The repository id may or may not be required by the repository that the entity is being created in. This method is the 9.1.3 version that is ignorant of public types, and will generally fall back to native types.

Parameters:
reposId - The repository ID of the new entity. Some repositories will require this, others won't.
name - The name of the new metadata item.
repos - The handle to the repository to create the new metadata in.
type - The type of the metadata to create. This can be either a "smart object" (com.sas.services.information.metadata.MetadataInterface) type, or a repository specific type (a CMetadata subclass, or an LDAP class).
Returns:
the new metadata entity (or null, if couldn't be created).
Throws:
ServiceException - If no definition for the type could be found, or some other error occurred.
java.rmi.RemoteException - In the event of a network problem.

newMetadata

MetadataInterface newMetadata(java.lang.String reposId,
                              java.lang.String name,
                              RepositoryInterface repos,
                              java.lang.String type)
                              throws java.rmi.RemoteException,
                                     ServiceException
Create a new metadata entity. The repository id may or may not be required by the repository that the entity is being created in.

Parameters:
reposId - The repository ID of the new entity. Some repositories will require this, others won't.
name - The name of the new metadata object.
repos - The handle to the repository to create the new metadata in.
type - The type of the metadata to create. This can be either a "smart object" (com.sas.services.information.metadata.MetadataInterface) type, or a repository specific type (a CMetadata subclass, or an LDAP class).
Returns:
the new metadata entity (or null, if couldn't be created).
Throws:
ServiceException - If no definition for the type could be found, or some other error occurred.
java.rmi.RemoteException - In the event of a network problem.

newMetadataByModel

MetadataInterface newMetadataByModel(MetadataInterface model,
                                     java.lang.String name)
                                     throws java.rmi.RemoteException,
                                            ServiceException
Create a new metadata entity. The repository id may or may not be required by the repository that the entity is being created in.

Parameters:
model - A Metadata object to use as a model for creating the new metadata. The new metadata will have the same type, be created in the same repository and may have other characteristics taken from the model.
name - The name of the new metadata item.
Returns:
the new metadata entity (or null, if non could be created).
Throws:
ServiceException - If no definition for the type could be found, or some other error occurred.
java.rmi.RemoteException - In the event of a network problem.

searchFilterArray

java.util.List searchFilterArray(UserContextInterface user,
                                 FilterInterface[] filters)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Perform a search in all the repositories the user is connected to using the provided Filters. All the filters are tried against all the repositories.

Parameters:
user - The user context to use to perform the search.
filters - The filters used to limit search results.
Returns:
A List of MetadataInterface objects found in the repositories matching the filter.
Throws:
ServiceException - in the event of repository error.
java.rmi.RemoteException - in the event of remote object failure.

search

java.util.List search(UserContextInterface user,
                      FilterInterface filter)
                      throws ServiceException,
                             java.rmi.RemoteException
Search all the repositories that a user is connected to. Use the filter provided to limit the search.

Parameters:
user - The user context that contains the connect repositories to use for the search.
filter - A filter to use to perform the search.
Returns:
A List of MetadataInterface objects that match the filter.
Throws:
ServiceException - in the event of repository error.
java.rmi.RemoteException - if a network anomaly is encountered.

searchProtocols

java.util.List searchProtocols(UserContextInterface user,
                               java.util.List protocols,
                               FilterInterface filter)
                               throws ServiceException,
                                      java.rmi.RemoteException
Perform a search in the repositories the user is connected to which match the domains in the provided Vector, using the provided Filter.

Parameters:
user - The user context to use to perform the search.
protocols - A List containing the repository protocols to perform the search in [omi, ldap, dav].
filter - The filter used to limit search results.
Returns:
A List of MetadataInterface objects found in the repositories matching the filter.
Throws:
ServiceException - in the event of repository failure.
java.rmi.RemoteException - if a network anomaly is encountered.

searchProtocolsWithFilterArray

java.util.List searchProtocolsWithFilterArray(UserContextInterface user,
                                              java.util.List protocols,
                                              FilterInterface[] filters)
                                              throws ServiceException,
                                                     java.rmi.RemoteException
Perform a search in the repositories the user is connected to which match the domains in the provided Vector, using the provided Filter.

Parameters:
user - The user context to use to perform the search.
protocols - A List containing the repository protocols to perform the search in [omi, ldap, dav].
filters - The filters used to limit search results.
Returns:
A List of MetadataInterface objects found in the repositories matching the filters.
Throws:
ServiceException - in the event of repository failure.
java.rmi.RemoteException - if a network anomaly is encountered.

searchTree

java.util.List searchTree(UserContextInterface user,
                          FilterInterface filter)
                          throws ServiceException,
                                 java.rmi.RemoteException
Search the repositories that the user is connected to, returning the results in a navigable folder structure.

Parameters:
user - The user context to use for the search.
filter - The filter used to limit search results.
Returns:
A List of FilteredRepositoryInterface objects used to navigate through the result set.
Throws:
ServiceException - in the event of repository failure.
java.rmi.RemoteException - in the event of remote object failure.

searchGroupName

java.util.List searchGroupName(UserContextInterface user,
                               java.lang.String groupName,
                               FilterInterface filter)
                               throws ServiceException,
                                      java.rmi.RemoteException
Search the repository group with the given name. All of the repositories in the group will be searched, and objects matching the filter will be returned. If the user doesn't have a connection to any of the repositories in the group, a connection will be attempted. If the connection fails, the remaining repositories will be tried and a PartialListResultsException will be thrown at the end. If a non-existent group is specified, a ServiceException will be thrown.

Parameters:
user - The user performing the search.
groupName - The name of the repository group to search.
filter - The filter specifying the objects to return.
Returns:
A List of Metadata objects matching the filter in the repositories in the group.
Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

searchGroup

java.util.List searchGroup(UserContextInterface user,
                           RepositoryGroup group,
                           FilterInterface filter)
                           throws ServiceException,
                                  java.rmi.RemoteException
Search the repository group that is provided. All of the repositories in the group will be searched, and objects matching the filter will be returned. If the user doesn't have a connection to any of the repositories in the group, a connection will be attempted. If the connection fails, the remaining repositories will be tried and a PartialListResultsException will be thrown at the end.

Parameters:
user - The user performing the search.
group - The repository group specifying the repositories to search.
filter - The filter specifying the objects to return.
Returns:
A List of Metadata objects matching the filter in the repositories in the group.
Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

searchGroupWithFilterArray

java.util.List searchGroupWithFilterArray(UserContextInterface user,
                                          RepositoryGroup group,
                                          FilterInterface[] filterArray)
                                          throws ServiceException,
                                                 java.rmi.RemoteException
Search the repository group that is provided. All of the repositories in the group will be searched, and objects matching the filter will be returned. If the user doesn't have a connection to any of the repositories in the group, a connection will be attempted. If the connection fails, the remaining repositories will be tried and a PartialListResultsException will be thrown at the end.

Parameters:
user - The user performing the search.
group - The repository group specifying the repositories to search.
filterArray - An array of filters specifying the objects to return.
Returns:
A List of Metadata objects matching the filter in the repositories in the group.
Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

searchGroupNameWithFilterArray

java.util.List searchGroupNameWithFilterArray(UserContextInterface user,
                                              java.lang.String groupName,
                                              FilterInterface[] filterArray)
                                              throws ServiceException,
                                                     java.rmi.RemoteException
Search the repository group that is provided. All of the repositories in the group will be searched, and objects matching the filter will be returned. If the user doesn't have a connection to any of the repositories in the group, a connection will be attempted. If the connection fails, the remaining repositories will be tried and a PartialListResultsException will be thrown at the end.

Parameters:
user - The user performing the search.
groupName - The name of the repository group specifying the repositories to search.
filterArray - An array of filters specifying the objects to return.
Returns:
A List of Metadata objects matching the filter in the repositories in the group.
Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

browseSearch

java.util.List browseSearch(UserContextInterface user,
                            Filter filter)
                            throws ServiceException,
                                   java.rmi.RemoteException
Search the user's connected repositories. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
filter - A Filter to limit the objects returned to those the client is interested in.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearchWithFilterArray

java.util.List browseSearchWithFilterArray(UserContextInterface user,
                                           Filter[] filters)
                                           throws ServiceException,
                                                  java.rmi.RemoteException
Search the user's connected repositories. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
filters - A Filter array to limit the objects returned to those the client is interested in.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearchProtocols

java.util.List browseSearchProtocols(UserContextInterface user,
                                     java.util.List protocols,
                                     Filter filter)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Search the user's connected repositories. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
protocols - a List of protocol Strings.
filter - A Filter to limit the objects returned to those the client is interested in.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearchProtocolsWithFilterArray

java.util.List browseSearchProtocolsWithFilterArray(UserContextInterface user,
                                                    java.util.List protocols,
                                                    Filter[] filters)
                                                    throws ServiceException,
                                                           java.rmi.RemoteException
Search the user's connected repositories. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
protocols - Protocols.
filters - Filters to limit the objects returned to those the client is interested in.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearchGroupName

java.util.List browseSearchGroupName(UserContextInterface user,
                                     java.lang.String groupName,
                                     Filter filter)
                                     throws ServiceException,
                                            java.rmi.RemoteException
Search the repository group for the user. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
filter - A Filter to limit the objects returned to those the client is interested in.
groupName - The repository group to search.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

browseSearchGroupNameWithFilterArray

java.util.List browseSearchGroupNameWithFilterArray(UserContextInterface user,
                                                    java.lang.String groupName,
                                                    Filter[] filters)
                                                    throws ServiceException,
                                                           java.rmi.RemoteException
Search the repository group for the user. 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. Not all repository types will honor a template, but SAS Metadata Server searches need one to get a useful set of data. Set the template on the Filter using the setOMRTemplate method.

Parameters:
user - The UserContext to perform the search for.
filters - An array of Filters to limit the objects returned to those the client is interested in.
groupName - The repository group to search.
Returns:
A List of BrowseMetadataInterface objects.
Throws:
ServiceException - In the event of repository errors.
java.rmi.RemoteException - In the event of remote object failure.

connectAuto

void connectAuto(UserContextInterface user)
                 throws ServiceException,
                        java.rmi.RemoteException
Connect to all repositories that have been predefined as auto-connect repositories. This method is called by UserService.newUser() to connect the newly created UserContext to the auto-connect repositories. It should be unnecessary for other client code to call this method.

Parameters:
user - The UserContext to connect to the repositories.
Throws:
ServiceException - in the event of a severe failure.
java.rmi.RemoteException - in the event of network failure

connectByName

RepositoryInterface connectByName(UserContextInterface user,
                                  java.lang.String name)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Connect to a preconfigured repository.

Parameters:
user - The user context to use to connect to the repository.
name - The "nickname" of the repository to connect to.
Returns:
A RepositoryInterface if the connection was successful, or null otherwise.
Throws:
ServiceException - if the repository name isn't defined, or a there's a problem making the connection.
java.rmi.RemoteException - in the event of network error.

connect

RepositoryInterface connect(UserContextInterface user,
                            RepositoryDef reposDef)
                            throws ServiceException,
                                   java.rmi.RemoteException
Connect to the repository specified in the repository definition.

Parameters:
user - The user context to connect to the repository.
reposDef - The repository definition with the information needed to connect to the service.
Returns:
The newly connected RepositoryInterface, or null if the connection fails.
Throws:
ServiceException - if a repository error occurs.
java.rmi.RemoteException - in the event of a network failure.

connect

ServerInterface connect(UserContextInterface user,
                        ServerDef serverDef)
                        throws ServiceException,
                               java.rmi.RemoteException
Connect to a ServerInterface object.

Parameters:
user - The user being connected. Any required credentials will be retrieved from this UserContext, and the ServerInterface will be added to its list of Servers.
serverDef - The ServerDefinition with the connection information to connect to the server.
Returns:
The connected ServerInterface.
Throws:
ServiceException - If a communications or other server error occurs.
java.rmi.RemoteException - In the event of remote object failure.

getFactoryConfig

java.util.HashMap getFactoryConfig()
                                   throws java.rmi.RemoteException
Return the configuration information for the Factory. This is the mapping of repository-specific types to the Java class that should represent them.

Returns:
A Map of factory configurations.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

addRepositoryDef

boolean addRepositoryDef(RepositoryDef repositoryDef)
                         throws java.rmi.RemoteException,
                                ServiceException
Adds a repository definition to the repository list.

Parameters:
repositoryDef - An information service repository definition.
Returns:
true if the repository definition was successfully added or false if it wasn't.
Throws:
java.rmi.RemoteException - in the event of remote object failure.
ServiceException - if unable to process the request to clear the repository definitions.

removeRepositoryDef

boolean removeRepositoryDef(RepositoryDef repositoryDef)
                            throws java.rmi.RemoteException,
                                   ServiceException
Removes a repository definition from the list of repositories.

Parameters:
repositoryDef - A Repository definition to remove.
Returns:
true if the repository definition was successfully removed or false if it wasn't.
Throws:
java.rmi.RemoteException - in the event of remote object failure.
ServiceException - if unable to process the request to clear the repository definitions.

clearRepositoryDefs

void clearRepositoryDefs()
                         throws java.rmi.RemoteException,
                                ServiceException
Removes all repository definitions.

Throws:
java.rmi.RemoteException - in the event of remote object failure.
ServiceException - if unable to process the request to clear the repository definitions.

getReposDefs

java.util.List getReposDefs()
                            throws java.rmi.RemoteException
Return a List of the preconfigured repository definitions. This list represents all the repositories that can be connected to by name.

Returns:
A List containing RepositoryDef objects for all the repositories that are in the Information Service configuration.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

addServerDef

boolean addServerDef(ServerDef serverDef)
                     throws ServiceException,
                            java.rmi.RemoteException
Add a new server definition to the Information Service configuration.

Parameters:
serverDef - The new server definition to add.
Returns:
true if the server definition was successfully added or false if it wasn't.
Throws:
ServiceException - If an error occurs while adding the definition.
java.rmi.RemoteException - In the event of remote object failure.

removeServerDef

boolean removeServerDef(ServerDef serverDef)
                        throws ServiceException,
                               java.rmi.RemoteException
Remove a server definition from the Information Service configuration.

Parameters:
serverDef - The server definition to remove.
Returns:
true if the server definition was successfully removed or false if it wasn't.
Throws:
ServiceException - If an error occurs while removing the definition.
java.rmi.RemoteException - In the event of remote object failure.

clearServerDefs

void clearServerDefs()
                     throws ServiceException,
                            java.rmi.RemoteException
Clear the set of defined server definitions.

Throws:
ServiceException - If an error occurs while clearing the definitions.
java.rmi.RemoteException - In the event of remote object failure.

getServerDefs

java.util.List getServerDefs()
                             throws java.rmi.RemoteException
Returns a List of the configured server definitions. This list represents all of the servers that can be connected to by name.

Returns:
A List of ServerDef objects that exist in the configuration.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getRepositoryGroups

java.util.List getRepositoryGroups()
                                   throws ServiceException,
                                          java.rmi.RemoteException
Return a List of the defined repository groups.

Returns:
A List of RepositoryGroup objects.
Throws:
ServiceException - in the event of service failure.
java.rmi.RemoteException - in the event of remote object failure.

getRepositoryGroup

RepositoryGroup getRepositoryGroup(java.lang.String name)
                                   throws ServiceException,
                                          java.rmi.RemoteException
Get the group with the given name.

Parameters:
name - The name of the repository group to return.
Returns:
the RepositoryGroup whose name matches the parameter, or null if no such group exists.
Throws:
ServiceException - in the event of a service error.
java.rmi.RemoteException - in the event of remote object failure.

addRepositoryGroup

boolean addRepositoryGroup(RepositoryGroup group)
                           throws ServiceException,
                                  java.rmi.RemoteException
Add a new group to the collection of defined repository groups that can be used to scope a search.

Parameters:
group - The new group to add to the definitions.
Returns:
true if the new group is successfully added, false otherwise.
Throws:
ServiceException - If a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

removeRepositoryGroup

boolean removeRepositoryGroup(RepositoryGroup group)
                              throws ServiceException,
                                     java.rmi.RemoteException
Remove a group from the collection of defined repository groups that can be used to scope a search.

Parameters:
group - The group to remove from the definitions.
Returns:
true if the group is successfully removed, false otherwise.
Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

clearRepositoryGroups

void clearRepositoryGroups()
                           throws ServiceException,
                                  java.rmi.RemoteException
Clear all repository group definitions.

Throws:
ServiceException - if a service error occurs.
java.rmi.RemoteException - in the event of remote object failure.

addMetadataChangeListener

void addMetadataChangeListener(MetadataChangeListener listener,
                               java.lang.String url)
                               throws ServiceException,
                                      java.rmi.RemoteException
Register a metadata change listener. These should typically be only RepositoryInterface implementers, and this call should be made by the Repository connect() method. The Information Service is the clearinghouse for metadata change notifications. Each repository should notify the Information Service when it persists a change to the backing store. The Information Service then notifies all the other repositories, so hopefully the data stays as up-to-date as possible.

Parameters:
listener - A MetadataChangeListener to add to the list.
url - A URL that represents the server to receive notifications for.
Throws:
java.lang.IllegalArgumentException - if the url is invalid.
ServiceException - if a service level error occurs.
java.rmi.RemoteException - in the event of remote object failure.

removeMetadataChangeListener

void removeMetadataChangeListener(MetadataChangeListener listener,
                                  java.lang.String url)
                                  throws java.rmi.RemoteException
Remove a metadata change listener. This should only be called by a Repository close() method.

Parameters:
listener - The listener to remove.
url - The url for the server the listener is listening for.
Throws:
java.lang.IllegalArgumentException - if the url is invalid.
java.rmi.RemoteException - in the event of remote object failure.

metadataChange

void metadataChange(MetadataChangeEvent event)
                    throws java.rmi.RemoteException
Process a metadata change event. Some metadata was changed, and all listeners to whom it applies need to be informed.

Parameters:
event - the MetadataChangeEvent that describes what changed.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

isAuthorized

boolean isAuthorized(UserContextInterface superUser,
                     IdentityInterface plainUser,
                     MetadataInterface objectToCheck,
                     java.lang.String permission)
                     throws ServiceException,
                            java.rmi.RemoteException
Check the authorization for a metadata object. Use the connection of superUser, the credentials of plainUser, and the ID of the object. If plainUser has the permission, return true.

Parameters:
superUser - The user whose connection to the repository we're to use.
plainUser - The user whose access we're checking.
objectToCheck - The object we want to check permissions on.
permission - The permission string we're checking for.
Returns:
True if plainUser has permission on objectToCheck, false otherwise
Throws:
ServiceException - in the event of a repository error.
java.rmi.RemoteException - in the event of remote object failure.

getReposKey

java.lang.String getReposKey(java.lang.String entityKey)
                             throws ServiceException,
                                    java.rmi.RemoteException
This is a utility method to take an entity key and return the repository key. This can be useful if a client already knows what repository the data is in, and wants to bypass the Information Service's searching for the correct repository instance.

Parameters:
entityKey - A String with the entity key.
Returns:
A String with the repository key that can be passed to the repository's fetch method.
Throws:
ServiceException - if a parse error occurs processing the entity key.
java.rmi.RemoteException - in the event of remote object failure.

addInformationServiceTimerClient

void addInformationServiceTimerClient(com.sas.services.information.InformationServiceTimerClient client)
                                      throws ServiceException,
                                             java.rmi.RemoteException
Add a client object to be triggered when the timer expires. Currently the timer is scheduled for every five minutes, but may be configurable in the future. This method is especially intended for use by the repository instances to purge/refresh cache objects.

Parameters:
client - A client object to trigger when the timer expires.
Throws:
ServiceException - In the event of Service object errors.
java.rmi.RemoteException - in the event of remote object failure.

removeInformationServiceTimerClient

void removeInformationServiceTimerClient(com.sas.services.information.InformationServiceTimerClient client)
                                         throws ServiceException,
                                                java.rmi.RemoteException
Remove a timer client from the service list.

Parameters:
client - The client to remove from the timer list.
Throws:
ServiceException - If a services error occurs.
java.rmi.RemoteException - In the event of remote object failure.

setIsolated

void setIsolated()
                 throws java.rmi.RemoteException
Set the service to isolate data retrieved from the metadata servers. Metadata objects will not be exported to RMI, and therefore will not be available outside the JVM. Use this option with care!

Throws:
java.rmi.RemoteException - in the event of remote object failure.

isIsolated

boolean isIsolated()
                   throws java.rmi.RemoteException
Get the flag that indicates if metadata isolation is active.

Returns:
true if isolation is on.
Throws:
java.rmi.RemoteException

getSmartObjectDefinitions

java.util.Map getSmartObjectDefinitions()
                                        throws java.rmi.RemoteException
Get the Map of Smart object definitions from the configuration. The returned Map is a copy of the configuration, and updating it will not affect the Information Service.

Returns:
A Map of SmartDef objects.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getObjectByPath

MetadataInterface getObjectByPath(UserContextInterface user,
                                  PathUrl path)
                                  throws ServiceException,
                                         java.rmi.RemoteException
Retrieve an object using the PathUrl.

Parameters:
user - The UserContextInterface for the user to retrieve the object for.
path - The PathUrl That points to the object to be retrieved.
Returns:
The object pointed to by the path, or null if it is not found.
Throws:
ServiceException - In the event of a repository error, an invalid PathUrl, or a service level error.
java.rmi.RemoteException - In the event of remote object failure.

addTypeMap

void addTypeMap(java.lang.String serverUrl,
                java.util.Map typeMap)
                throws java.rmi.RemoteException
Cache a type map for a given server. The host string should be a URL format with the host name and port number. (e.g., omi://host.dot.com:8561).

Parameters:
serverURL - The server identifier for the type map being added.
typeMap - A Map of TypeDefinitions for the server.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getTypeMap

java.util.Map getTypeMap(java.lang.String serverUrl)
                         throws java.rmi.RemoteException
Get a type definition map for a given server.

Parameters:
serverUrl - The server identifier to retrieve the type map for.
Returns:
The map of TypeDefinition objects, or null if it hasn't been retrieved.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

addExplicitIdentityGroupsMap

void addExplicitIdentityGroupsMap(java.lang.String serverUrl,
                                  java.util.Map ExplicitIdentityGroupsMap)
                                  throws java.rmi.RemoteException
Cache a type map for a given server. The host string should be a URL format with the host name and port number. (e.g., omi://host.dot.com:8561).

Parameters:
serverURL - The server identifier for the type map being added.
typeMap - A Map of Explicit IdentityGroups (i.e. SASUSERS & PUBLIC) for the server.
Throws:
java.rmi.RemoteException - In the event of remote object failure.

getExplicitIdentityGroupsMap

java.util.Map getExplicitIdentityGroupsMap(java.lang.String serverUrl)
                                           throws java.rmi.RemoteException
Get an Explicit IdentityGroups map for a given server.

Parameters:
serverUrl - The server identifier to retrieve the IdentityGroups for.
Returns:
The map of Explicit IdentityGroups objects, or null if it hasn't been retrieved.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

getServerForPath

ServerInterface getServerForPath(UserContextInterface user,
                                 PathUrl path)
                                 throws ServiceException,
                                        java.rmi.RemoteException
Return the ServerInterface for the path given. If the path has the server name, it's easy. Just get it from the UserContext. Otherwise, go through the user's connected servers and ask each RepositoryInterface for its ISName and compare them to the one in the Pathurl. Needless to say, it's much better if the PathUrl has the server name in it.

Parameters:
user - The UserContext containing the ServerInterface(s).
path - The PathUrl that the client wants the server for.
Returns:
The ServerInterface containing the path, if it can be determined.
Throws:
ServiceException - If the path is ambiguous. That is, the path contains a repository name that's in multiple servers, or the server name isn't found.
java.rmi.RemoteException - In the event of remote object failure.

***  This interface provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.