public class ServiceManager extends Object
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 and Description |
---|
ServiceManager(SSOToken token)
Creates an instance of
ServiceManager . |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Removes all the SMS cached entries.
|
ServiceConfigManager |
getConfigManager(String serviceName,
String version)
Returns the
ServiceConfigManager for
the given service name and version. |
ServiceSchemaManager |
getSchemaManager(String serviceName,
String version)
Returns the
ServiceSchemaManager for
the given service name and version. |
Set |
getServiceNames()
Returns all the service names that have been
registered.
|
Set |
getServiceVersions(String serviceName)
Returns all versions supported by the service.
|
static boolean |
isRealmEnabled()
Returns
true if current service
configuration uses the realm model to store the configuration data. |
Set |
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.
|
public ServiceManager(SSOToken token) throws SSOException, SMSException
ServiceManager
.
The SSOToken
is used to identify the user performing
service operations.token
- the authenticated single sign on token.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic ServiceSchemaManager getSchemaManager(String serviceName, String version) throws SMSException, SSOException
ServiceSchemaManager
for
the given service name and version.serviceName
- the name of the serviceversion
- the version of the serviceServiceSchemaManager
for the given service
name and versionSSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic ServiceConfigManager getConfigManager(String serviceName, String version) throws SMSException, SSOException
ServiceConfigManager
for
the given service name and version.serviceName
- the name of the serviceversion
- the version of the serviceServiceConfigManager
for the given service
name and version.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic Set getServiceNames() throws SMSException
SMSException
- if an error occurred while performing the operationpublic Set getServiceVersions(String serviceName) throws SMSException
serviceName
- service name.SMSException
- if an error occurred while performing the operationpublic Set registerServices(InputStream xmlServiceSchema) throws SMSException, SSOException
xmlServiceSchema
- the input stream of service metadata in XML conforming to SMS
DTD.SMSException
- if an error occurred while performing the operation.SSOException
- if the user's single sign on token is invalid or
expired.public void removeService(String serviceName, String version) throws SMSException, SSOException
serviceName
- the name of the serviceversion
- the version of the serviceSMSException
- if an error occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void clearCache()
public static boolean isRealmEnabled()
true
if current service
configuration uses the realm model to store the configuration data.true
is realm model is used for storing
configuration data; false
otherwise.Copyright © 2010-2014, ForgeRock All Rights Reserved.