Package com.sun.identity.sm
Class ServiceManager
java.lang.Object
com.sun.identity.sm.ServiceManager
The
ServiceManager
class provides methods to register/remove
services and to list currently registered services. It also provides methods
to obtain an instance of ServiceSchemaManager
and an instance
of ServiceConfigManager
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes all the SMS cached entries.getConfigManager
(String serviceName, String version) Returns theServiceConfigManager
for the given service name and version.getSchemaManager
(String serviceName, String version) Returns theServiceSchemaManager
for the given service name and version.Returns all the service names that have been registered.getServiceVersions
(String serviceName) Returns all versions supported by the service.registerServices
(InputStream xmlServiceSchema) Registers one or more services, defined by the XML input stream that follows the SMS DTD.void
removeService
(String serviceName, String version) Removes the service schema and configuration for the given service name.
-
Constructor Details
-
ServiceManager
Creates an instance ofServiceManager
. TheSSOToken
is used to identify the user performing service operations.- Parameters:
token
- the authenticated single sign on token.- Throws:
SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operation
-
-
Method Details
-
getSchemaManager
@Supported public ServiceSchemaManager getSchemaManager(String serviceName, String version) throws SMSException, SSOException Returns theServiceSchemaManager
for the given service name and version.- Parameters:
serviceName
- the name of the serviceversion
- the version of the service- Returns:
- the
ServiceSchemaManager
for the given service name and version - Throws:
SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operation
-
getConfigManager
@Supported public ServiceConfigManager getConfigManager(String serviceName, String version) throws SMSException, SSOException Returns theServiceConfigManager
for the given service name and version.- Parameters:
serviceName
- the name of the serviceversion
- the version of the service- Returns:
- the
ServiceConfigManager
for the given service name and version. - Throws:
SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operation
-
getServiceNames
Returns all the service names that have been registered.- Returns:
- the set of names of services that have been registered
- Throws:
SMSException
- if an error occurred while performing the operation
-
getServiceVersions
Returns all versions supported by the service.- Parameters:
serviceName
- service name.- Returns:
- the set of versions supported by the service
- Throws:
SMSException
- if an error occurred while performing the operation
-
registerServices
@Supported public Set<String> registerServices(InputStream xmlServiceSchema) throws SMSException, SSOException Registers one or more services, defined by the XML input stream that follows the SMS DTD.- Parameters:
xmlServiceSchema
- the input stream of service metadata in XML conforming to SMS DTD.- Returns:
- set of registered service names.
- Throws:
SMSException
- if an error occurred while performing the operation.SSOException
- if the user's single sign on token is invalid or expired.
-
removeService
@Supported public void removeService(String serviceName, String version) throws SMSException, SSOException Removes the service schema and configuration for the given service name.- Parameters:
serviceName
- the name of the serviceversion
- the version of the service- Throws:
SMSException
- if an error occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expired
-
clearCache
Removes all the SMS cached entries. This method should be called to clear the cache for example, if ACIs for the SMS entries are changed in the directory. Also, this clears the SMS entries only in this JVM instance. If multiple instances (of JVM) are running this method must be called within each instance.
-