*** This interface provides Binary Compatibility only, not Source Compatibility ***
Interface InformationServiceInterface
- All Superinterfaces:
com.sas.entities.EntityKeyInterface,Remote,RemoteServiceInterface,ServiceNotificationBroadcasterInterface
- All Known Implementing Classes:
InformationService
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe setOption option parameter for setting whether type definitions should be cached.static final intthe setOption option parameter for setting the folder item refresh interval in milliseconds.static final intThe setOption option parameter for setting the Folder subfolder refresh interval in milliseconds.static final intThe 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
Modifier and TypeMethodDescriptionvoidaddExplicitIdentityGroupsMap(String serverUrl, Map ExplicitIdentityGroupsMap) Deprecated.voidaddInformationServiceTimerClient(InformationServiceTimerClient client) Add a client object to be triggered when the timer expires.voidaddMetadataChangeListener(MetadataChangeListener listener, String url) Register a metadata change listener.booleanaddRepositoryDef(RepositoryDef repositoryDef) Adds a repository definition to the repository list.booleanAdd a new group to the collection of defined repository groups that can be used to scope a search.booleanaddServerDef(ServerDef serverDef) Add a new server definition to the Information Service configuration.voidaddTypeMap(String serverUrl, Map typeMap) Cache a type map for a given server.ListbrowseSearch(UserContextInterface user, Filter filter) Search the user's connected repositories.ListbrowseSearchGroupName(UserContextInterface user, String groupName, Filter filter) Search the repository group for the user.ListbrowseSearchGroupNameWithFilterArray(UserContextInterface user, String groupName, Filter[] filters) Search the repository group for the user.ListbrowseSearchProtocols(UserContextInterface user, List protocols, Filter filter) Search the user's connected repositories.ListbrowseSearchProtocolsWithFilterArray(UserContextInterface user, List protocols, Filter[] filters) Search the user's connected repositories.ListbrowseSearchWithFilterArray(UserContextInterface user, Filter[] filters) Search the user's connected repositories.voidRemoves all repository definitions.voidClear all repository group definitions.voidClear the set of defined server definitions.connect(UserContextInterface user, RepositoryDef reposDef) Connect to the repository specified in the repository definition.connect(UserContextInterface user, ServerDef serverDef) Connect to a ServerInterface object.connect(UserContextInterface user, ServerDef serverDef, Cluster cluster) Connect to a ServerInterface object.voidConnect to all repositories that have been predefined as auto-connect repositories.connectByName(UserContextInterface user, String name) Connect to a preconfigured repository.fetchEntityByKey(UserContextInterface user, String key) Fetch an entity from a repository based on the entity key.fetchEntityByKey(UserContextInterface user, String key, boolean bypassCache) Fetch an entity from a repository based on the entity key.fetchEntityByUrl(UserContextInterface user, String url, String domain) Fetch an entity from a repository based on the url.fetchEntityByUrl(UserContextInterface user, String url, String domain, boolean bypassCache) Fetch an entity from a repository based on the url.ListThis method searches the connected metadata stores for server definitions that can participate in the Information Service as repositories.MapgetExplicitIdentityGroupsMap(String serverUrl) Deprecated.HashMapReturn the configuration information for the Factory.getObjectByPath(UserContextInterface user, PathUrl path) Retrieve an object using the PathUrl.ObjectgetOption(int option) Get an option value from the InformationService or its components.ListReturn a List of the preconfigured repository definitions.getRepositoryGroup(String name) Get the group with the given name.ListReturn a List of the defined repository groups.StringgetRepositoryUrl(String name) Get the URL for a repository definition by name.StringgetReposKey(String entityKey) This is a utility method to take an entity key and return the repository key.ListReturns a List of the configured server definitions.getServerForPath(UserContextInterface user, PathUrl path) Return theServerInterfacefor the path given.MapGet the Map of Smart object definitions from the configuration.getTrackedObject(UserContextInterface user, int trackingId) Fetch an item based on its tracking ID number.MapgetTypeMap(String serverUrl) Get a type definition map for a given server.booleanisAuthorized(UserContextInterface superUser, IdentityInterface plainUser, MetadataInterface objectToCheck, String permission) Check the authorization for a metadata object.booleanGet the flag that indicates if metadata isolation is active.voidProcess a metadata change event.newMetadata(String reposId, String name, RepositoryInterface repos, String type) Create a new metadata entity.newMetadata913(String reposId, String name, RepositoryInterface repos, String type) Create a new metadata entity.newMetadataByModel(MetadataInterface model, String name) Create a new metadata entity.newMetadataInFolder(FolderInterface folder, RepositoryInterface repos, String type, String name) Create a new Metadata entity.voidremoveInformationServiceTimerClient(InformationServiceTimerClient client) Remove a timer client from the service list.voidremoveMetadataChangeListener(MetadataChangeListener listener, String url) Remove a metadata change listener.booleanremoveRepositoryDef(RepositoryDef repositoryDef) Removes a repository definition from the list of repositories.booleanRemove a group from the collection of defined repository groups that can be used to scope a search.booleanremoveServerDef(ServerDef serverDef) Remove a server definition from the Information Service configuration.Listsearch(UserContextInterface user, FilterInterface filter) Search all the repositories that a user is connected to.ListsearchFilterArray(UserContextInterface user, FilterInterface[] filters) Perform a search in all the repositories the user is connected to using the provided Filters.ListsearchGroup(UserContextInterface user, RepositoryGroup group, FilterInterface filter) Search the repository group that is provided.ListsearchGroupName(UserContextInterface user, String groupName, FilterInterface filter) Search the repository group with the given name.ListsearchGroupNameWithFilterArray(UserContextInterface user, String groupName, FilterInterface[] filterArray) Search the repository group that is provided.ListsearchGroupWithFilterArray(UserContextInterface user, RepositoryGroup group, FilterInterface[] filterArray) Search the repository group that is provided.ListsearchProtocols(UserContextInterface user, 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.ListsearchProtocolsWithFilterArray(UserContextInterface user, 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.ListsearchTree(UserContextInterface user, FilterInterface filter) Search the repositories that the user is connected to, returning the results in a navigable folder structure.voidSet the service to isolate data retrieved from the metadata servers.voidsetOption(int option, Object o) Set an option on the InformationService or its components.Methods inherited from interface com.sas.entities.EntityKeyInterface
getEntityKey, sameEntity, setEntityKeyMethods inherited from interface com.sas.services.RemoteServiceInterface
configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceProxy, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceStateMethods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver
-
Field Details
-
OPTION_METADATA_TREE_REFRESH_MSEC
static final int OPTION_METADATA_TREE_REFRESH_MSECThe 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:
-
OPTION_FOLDER_ITEM_REFRESH_MSEC
static final int OPTION_FOLDER_ITEM_REFRESH_MSECthe setOption option parameter for setting the folder item refresh interval in milliseconds. The value for this options should be an Integer.- See Also:
-
OPTION_FOLDER_SUBFOLDER_REFRESH_MSEC
static final int OPTION_FOLDER_SUBFOLDER_REFRESH_MSECThe setOption option parameter for setting the Folder subfolder refresh interval in milliseconds. The value for this option should be an Integer.- See Also:
-
OPTION_CACHE_TYPE_DEFINITIONS
static final int OPTION_CACHE_TYPE_DEFINITIONSThe 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:
-
-
Method Details
-
setOption
void setOption(int option, Object o) throws IllegalArgumentException, ServiceException, 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:
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.RemoteException- In the event of remote object failure.
-
getOption
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:
IllegalArgumentException- If the option specified isn't a valid option.ServiceException- In the event an error occurs while getting the option value.RemoteException- In the event of remote object failure.
-
getRepositoryUrl
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.RemoteException- in the event of network failure.
-
findServers
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.RemoteException- if a network anomaly is encountered.
-
getTrackedObject
MetadataInterface getTrackedObject(UserContextInterface user, int trackingId) throws 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:
RemoteException- in the event of remote object failure.
-
fetchEntityByKey
MetadataInterface fetchEntityByKey(UserContextInterface user, String key) throws 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.RemoteException- in the event of remote object failure.
-
fetchEntityByKey
MetadataInterface fetchEntityByKey(UserContextInterface user, String key, boolean bypassCache) throws 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.RemoteException- in the event of remote object failure.
-
fetchEntityByUrl
MetadataInterface fetchEntityByUrl(UserContextInterface user, String url, String domain) throws 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.RemoteException- in the event of remote object failure.
-
fetchEntityByUrl
MetadataInterface fetchEntityByUrl(UserContextInterface user, String url, String domain, boolean bypassCache) throws 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.RemoteException- in the event of remote object failure.
-
newMetadataInFolder
MetadataInterface newMetadataInFolder(FolderInterface folder, RepositoryInterface repos, String type, String name) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
newMetadata913
MetadataInterface newMetadata913(String reposId, String name, RepositoryInterface repos, String type) throws 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.RemoteException- In the event of a network problem.
-
newMetadata
MetadataInterface newMetadata(String reposId, String name, RepositoryInterface repos, String type) throws 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.RemoteException- In the event of a network problem.
-
newMetadataByModel
MetadataInterface newMetadataByModel(MetadataInterface model, String name) throws 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.RemoteException- In the event of a network problem.
-
searchFilterArray
List searchFilterArray(UserContextInterface user, FilterInterface[] filters) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
search
List search(UserContextInterface user, FilterInterface filter) throws ServiceException, 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.RemoteException- if a network anomaly is encountered.
-
searchProtocols
List searchProtocols(UserContextInterface user, List protocols, FilterInterface filter) throws ServiceException, 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.RemoteException- if a network anomaly is encountered.
-
searchProtocolsWithFilterArray
List searchProtocolsWithFilterArray(UserContextInterface user, List protocols, FilterInterface[] filters) throws ServiceException, 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.RemoteException- if a network anomaly is encountered.
-
searchTree
List searchTree(UserContextInterface user, FilterInterface filter) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
searchGroupName
List searchGroupName(UserContextInterface user, String groupName, FilterInterface filter) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
searchGroup
List searchGroup(UserContextInterface user, RepositoryGroup group, FilterInterface filter) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
searchGroupWithFilterArray
List searchGroupWithFilterArray(UserContextInterface user, RepositoryGroup group, FilterInterface[] filterArray) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
searchGroupNameWithFilterArray
List searchGroupNameWithFilterArray(UserContextInterface user, String groupName, FilterInterface[] filterArray) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
browseSearch
List browseSearch(UserContextInterface user, Filter filter) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
browseSearchWithFilterArray
List browseSearchWithFilterArray(UserContextInterface user, Filter[] filters) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
browseSearchProtocols
List browseSearchProtocols(UserContextInterface user, List protocols, Filter filter) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
browseSearchProtocolsWithFilterArray
List browseSearchProtocolsWithFilterArray(UserContextInterface user, List protocols, Filter[] filters) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
browseSearchGroupName
List browseSearchGroupName(UserContextInterface user, String groupName, Filter filter) throws ServiceException, 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.groupName- The repository group to search.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.RemoteException- In the event of remote object failure.
-
browseSearchGroupNameWithFilterArray
List browseSearchGroupNameWithFilterArray(UserContextInterface user, String groupName, Filter[] filters) throws ServiceException, 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.groupName- The repository group to search.filters- An array of 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.RemoteException- In the event of remote object failure.
-
connectAuto
Connect to all repositories that have been predefined as auto-connect repositories. This method is called byUserService.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.RemoteException- in the event of network failure
-
connectByName
RepositoryInterface connectByName(UserContextInterface user, String name) throws ServiceException, 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.RemoteException- in the event of network error.
-
connect
RepositoryInterface connect(UserContextInterface user, RepositoryDef reposDef) throws ServiceException, 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.RemoteException- in the event of a network failure.
-
connect
ServerInterface connect(UserContextInterface user, ServerDef serverDef) throws ServiceException, RemoteException Connect to a ServerInterface object.For any client connecting to a metadata server, it is strongly recommended that the
connect(UserContextInterface, ServerDef, Cluster)method be used instead.- 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.RemoteException- In the event of remote object failure.
-
connect
ServerInterface connect(UserContextInterface user, ServerDef serverDef, Cluster cluster) throws ServiceException, 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.cluster- The cluster definition to use for the connection.- Returns:
- The connected ServerInterface.
- Throws:
ServiceException- If a communications or other server error occurs.RemoteException- In the event of remote object failure.
-
getFactoryConfig
HashMap getFactoryConfig() throws RemoteExceptionReturn 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:
RemoteException- in the event of remote object failure.
-
addRepositoryDef
Adds a repository definition to the repository list.- Parameters:
repositoryDef- An information service repository definition.- Returns:
trueif the repository definition was successfully added orfalseif it wasn't.- Throws:
RemoteException- in the event of remote object failure.ServiceException- if unable to process the request to clear the repository definitions.
-
removeRepositoryDef
Removes a repository definition from the list of repositories.- Parameters:
repositoryDef- A Repository definition to remove.- Returns:
trueif the repository definition was successfully removed orfalseif it wasn't.- Throws:
RemoteException- in the event of remote object failure.ServiceException- if unable to process the request to clear the repository definitions.
-
clearRepositoryDefs
Removes all repository definitions.- Throws:
RemoteException- in the event of remote object failure.ServiceException- if unable to process the request to clear the repository definitions.
-
getReposDefs
List getReposDefs() throws RemoteExceptionReturn 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:
RemoteException- in the event of remote object failure.
-
addServerDef
Add a new server definition to the Information Service configuration.- Parameters:
serverDef- The new server definition to add.- Returns:
trueif the server definition was successfully added orfalseif it wasn't.- Throws:
ServiceException- If an error occurs while adding the definition.RemoteException- In the event of remote object failure.
-
removeServerDef
Remove a server definition from the Information Service configuration.- Parameters:
serverDef- The server definition to remove.- Returns:
trueif the server definition was successfully removed orfalseif it wasn't.- Throws:
ServiceException- If an error occurs while removing the definition.RemoteException- In the event of remote object failure.
-
clearServerDefs
Clear the set of defined server definitions.- Throws:
ServiceException- If an error occurs while clearing the definitions.RemoteException- In the event of remote object failure.
-
getServerDefs
List getServerDefs() throws RemoteExceptionReturns 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:
RemoteException- In the event of remote object failure.
-
getRepositoryGroups
Return a List of the defined repository groups.- Returns:
- A List of RepositoryGroup objects.
- Throws:
ServiceException- in the event of service failure.RemoteException- in the event of remote object failure.
-
getRepositoryGroup
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.RemoteException- in the event of remote object failure.
-
addRepositoryGroup
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.RemoteException- in the event of remote object failure.
-
removeRepositoryGroup
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.RemoteException- in the event of remote object failure.
-
clearRepositoryGroups
Clear all repository group definitions.- Throws:
ServiceException- if a service error occurs.RemoteException- in the event of remote object failure.
-
addMetadataChangeListener
void addMetadataChangeListener(MetadataChangeListener listener, String url) throws ServiceException, 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:
IllegalArgumentException- if the url is invalid.ServiceException- if a service level error occurs.RemoteException- in the event of remote object failure.
-
removeMetadataChangeListener
void removeMetadataChangeListener(MetadataChangeListener listener, String url) throws 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:
IllegalArgumentException- if the url is invalid.RemoteException- in the event of remote object failure.
-
metadataChange
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:
RemoteException- in the event of remote object failure.
-
isAuthorized
boolean isAuthorized(UserContextInterface superUser, IdentityInterface plainUser, MetadataInterface objectToCheck, String permission) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
getReposKey
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.RemoteException- in the event of remote object failure.
-
addInformationServiceTimerClient
void addInformationServiceTimerClient(InformationServiceTimerClient client) throws ServiceException, 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.RemoteException- in the event of remote object failure.
-
removeInformationServiceTimerClient
void removeInformationServiceTimerClient(InformationServiceTimerClient client) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
setIsolated
void setIsolated() throws RemoteExceptionSet 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:
RemoteException- in the event of remote object failure.
-
isIsolated
boolean isIsolated() throws RemoteExceptionGet the flag that indicates if metadata isolation is active.- Returns:
- true if isolation is on.
- Throws:
RemoteException
-
getSmartObjectDefinitions
Map getSmartObjectDefinitions() throws RemoteExceptionGet 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
SmartDefobjects. - Throws:
RemoteException- In the event of remote object failure.
-
getObjectByPath
MetadataInterface getObjectByPath(UserContextInterface user, PathUrl path) throws ServiceException, 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.RemoteException- In the event of remote object failure.
-
addTypeMap
void addTypeMap(String serverUrl, Map typeMap) throws 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:
typeMap- A Map of TypeDefinitions for the server.serverURL- The server identifier for the type map being added.- Throws:
RemoteException- In the event of remote object failure.
-
getTypeMap
Map getTypeMap(String serverUrl) throws 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:
RemoteException- in the event of remote object failure.
-
addExplicitIdentityGroupsMap
@Deprecated void addExplicitIdentityGroupsMap(String serverUrl, Map ExplicitIdentityGroupsMap) throws RemoteException Deprecated.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:
RemoteException- In the event of remote object failure.
-
getExplicitIdentityGroupsMap
@Deprecated Map getExplicitIdentityGroupsMap(String serverUrl) throws RemoteException Deprecated.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:
RemoteException- in the event of remote object failure.
-
getServerForPath
ServerInterface getServerForPath(UserContextInterface user, PathUrl path) throws ServiceException, RemoteException Return theServerInterfacefor 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.RemoteException- In the event of remote object failure.
-