public class ServiceConfigManager extends Object
ServiceConfigurationManager
provides interfaces to
manage the service's configuration data. It provides access to
ServiceConfig
which represents a single "configuration" in the
service. It manages configuration data only for GLOBAL and ORGANIZATION
types.Constructor and Description |
---|
ServiceConfigManager(SSOToken token,
String serviceName,
String version)
Creates an instance of
ServiceConfigManager for the given service and version. |
ServiceConfigManager(String serviceName,
SSOToken token)
Constrctor to obtain an instance
ServiceConfigManager
for
a service by providing an authenticated identity of the user. |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(InputStream in)
Adds instances, global and organization
configurations
|
String |
addListener(ServiceListener listener)
Registers for changes to service's configuration.
|
ServiceConfig |
createGlobalConfig(Map attrs)
Creates global configuration for the default
instance of the service given the configuration attributes.
|
ServiceConfig |
createOrganizationConfig(String orgName,
Map attrs)
Creates organization configuration for the default
instance of the service given configuration attributes.
|
void |
deleteOrganizationConfig(String orgName)
Deletes the organization configuration data for the
given organization.
|
boolean |
equals(Object o)
Compares this object with the given object.
|
ServiceConfig |
getGlobalConfig(String instanceName)
Returns the global configuration for the given
service instance.
|
Set |
getGroupNames()
Returns the configuration group names
|
ServiceInstance |
getInstance(String instanceName)
Returns the service instance given the instance
name
|
Set |
getInstanceNames()
Returns the service instance names
|
String |
getName()
Returns the name of the service.
|
ServiceConfig |
getOrganizationConfig(String orgName,
String instanceName)
Returns the organization configuration for the
given organization and instance name.
|
PluginConfig |
getPluginConfig(String name,
String pluginSchemaName,
String interfaceName,
String orgName)
Returns the plugin configuration parameters for the service
|
Set |
getPluginConfigNames(String pluginSchemaName,
String interfaceName,
String orgName)
Returns a set of plugins configured for the given plugin interface and
plugin schema in a organization
|
String |
getVersion()
Returns the service version.
|
int |
hashCode() |
void |
removeGlobalConfiguration(String groupName)
Deletes the global configuration data for the given
group name.
|
void |
removeInstance(String instanceName)
Removes the instance form the service
|
void |
removeListener(String listenerID)
Removes the listener from the service for the given
listener ID.
|
void |
removeOrganizationConfiguration(String orgName,
String groupName)
Deletes the organization's group configuration
data.
|
void |
removeOrganizationConfiguration(String orgName,
String groupName,
boolean checkLegacyMode)
Deletes the organization's group configuration data.
|
void |
removePluginConfig(String name,
String pluginSchemaName,
String interfaceName,
String orgName)
Removes the plugin configuration for the service
|
String |
toString()
Returns String representation of the service's
configuration data, along with instances and groups.
|
String |
toXML(AMEncryption encryptObj) |
public ServiceConfigManager(String serviceName, SSOToken token) throws SMSException, SSOException
ServiceConfigManager
for
a service by providing an authenticated identity of the user.
This constructor assumes the server version to be 1.0
.serviceName
- name of the servicetoken
- single sign on token of authenticated user identitySMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic ServiceConfigManager(SSOToken token, String serviceName, String version) throws SMSException, SSOException
ServiceConfigManager
for the given service and version. It
requires an user identity, that will used to perform operations with. It
is assumed that the application calling this constructor should
authenticate the user.token
- single sign on token of the user identity on whose behalf the
operations are performed.serviceName
- the name of the serviceversion
- the version of the serviceSMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic String getName()
public String getVersion()
public Set getInstanceNames() throws SMSException
SMSException
- if an error has occurred while performing the operationpublic Set getGroupNames() throws SMSException
SMSException
- if an error has occurred while performing the operationpublic ServiceInstance getInstance(String instanceName) throws SMSException, SSOException
instanceName
- the name of the service instanceSMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void removeInstance(String instanceName) throws SMSException, SSOException
instanceName
- the service instance nameSMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic ServiceConfig getGlobalConfig(String instanceName) throws SMSException, SSOException
instanceName
- the service instance nameSMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic ServiceConfig getOrganizationConfig(String orgName, String instanceName) throws SMSException, SSOException
orgName
- the name of the organizationinstanceName
- the service configuration instance nameSMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic ServiceConfig createGlobalConfig(Map attrs) throws SMSException, SSOException
attrs
- map of attribute values.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic ServiceConfig createOrganizationConfig(String orgName, Map attrs) throws SMSException, SSOException
orgName
- name of organization.attrs
- map of attribute values.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void addConfiguration(InputStream in) throws SMSException, SSOException
in
- input stream of configuration data.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void removeGlobalConfiguration(String groupName) throws SMSException, SSOException
null
, it used the default
group name.groupName
- name of group.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void deleteOrganizationConfig(String orgName) throws SMSException, SSOException
orgName
- name of organization.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void removeOrganizationConfiguration(String orgName, String groupName) throws SMSException, SSOException
orgName
- name of organization.groupName
- name of group.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic void removeOrganizationConfiguration(String orgName, String groupName, boolean checkLegacyMode) throws SMSException, SSOException
orgName
- name of organization.groupName
- name of group.checkLegacyMode
- boolean to check if legacy or realm passed by amsdk as false.SMSException
- if an error has occurred while performing the operationSSOException
- if the user's single sign on token is invalid or expiredpublic Set getPluginConfigNames(String pluginSchemaName, String interfaceName, String orgName) throws SMSException, SSOException
SMSException
SSOException
public PluginConfig getPluginConfig(String name, String pluginSchemaName, String interfaceName, String orgName) throws SMSException, SSOException
SMSException
SSOException
public void removePluginConfig(String name, String pluginSchemaName, String interfaceName, String orgName) throws SMSException, SSOException
SMSException
SSOException
public String addListener(ServiceListener listener)
listener
- callback object that will be invoked when schema changes.public void removeListener(String listenerID)
listenerID
- the listener ID issued when the listener was registeredpublic boolean equals(Object o)
public String toString()
public String toXML(AMEncryption encryptObj) throws SMSException, SSOException
SMSException
SSOException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.