Package com.sun.identity.sm
Class ServiceManager
- java.lang.Object
-
- com.sun.identity.sm.ServiceManager
-
@Supported public class ServiceManager extends Object
TheServiceManager
class provides methods to register/remove services and to list currently registered services. It also provides methods to obtain an instance ofServiceSchemaManager
and an instance ofServiceConfigManager
.
-
-
Constructor Summary
Constructors Constructor Description ServiceManager(SSOToken token)
Creates an instance ofServiceManager
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Removes all the SMS cached entries.ServiceConfigManager
getConfigManager(String serviceName, String version)
Returns theServiceConfigManager
for the given service name and version.ServiceSchemaManager
getSchemaManager(String serviceName, String version)
Returns theServiceSchemaManager
for the given service name and version.Set<String>
getServiceNames()
Returns all the service names that have been registered.Set<String>
getServiceVersions(String serviceName)
Returns all versions supported by the service.Set<String>
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 Detail
-
ServiceManager
@Supported public ServiceManager(SSOToken token) throws SSOException, SMSException
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 Detail
-
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
@Supported public Set<String> getServiceNames() throws SMSException
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
@Supported public Set<String> getServiceVersions(String serviceName) throws SMSException
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
@Supported public void 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.
-
-