|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.identity.sm.ServiceConfig
The class ServiceConfig
provides interfaces
to manage the configuration information of a service configuration.
It provides methods to get and set configuration parameters
for this service configuration.
Method Summary | |
void |
addAttribute(java.lang.String attrName,
java.util.Set values)
Adds a configuration parameter to the service configuration. |
void |
addSubConfig(java.lang.String subConfigName,
java.lang.String subConfigId,
int priority,
java.util.Map attrs)
Adds a service sub-configuration with configuration parameters. |
java.util.Map |
getAttributes()
Returns the service configuration parameters. |
java.lang.String |
getComponentName()
Returns the service component name. |
java.lang.String |
getDN()
Returns the LDAP DN represented by this ServiceConfig
object. |
java.lang.String |
getLastModifiedTime()
Returns the last modified time stamp of this configuration This method is expensive because it does not cache the modified time stamp but goes directly to the data store to obtain the value of this entry |
int |
getPriority()
Returns the priority assigned to the service configuration. |
java.lang.String |
getServiceName()
Returns the name of this service configuration. |
ServiceConfig |
getSubConfig(java.lang.String subConfigName)
Returns the service's sub-configuration given the service's sub-configuration name. |
java.util.Set |
getSubConfigNames()
Returns the names of all service's sub-configurations. |
java.util.Set |
getSubConfigNames(java.lang.String pattern)
Method to get names of service's sub-configurations that match the given pattern. |
java.lang.String |
getVersion()
Returns the service version |
void |
removeAttribute(java.lang.String attrName)
Removes a configuration parameter from the service configuration. |
void |
removeAttributeValues(java.lang.String attrName,
java.util.Set values)
Removes the specific values for the given configuration parameter. |
void |
removeSubConfig(java.lang.String subConfigName)
Removes the service sub-configuration. |
void |
replaceAttributeValue(java.lang.String attrName,
java.lang.String oldValue,
java.lang.String newValue)
Replaces old value of the configuration parameter with new value. |
void |
replaceAttributeValues(java.lang.String attrName,
java.util.Set oldValues,
java.util.Set newValues)
Replaces the old values of the configuration parameter with the new values. |
void |
setAttributes(java.util.Map attrs)
Sets the service configuration parameters. |
void |
setPriority(int priority)
Sets the priority to the service configuration. |
java.lang.String |
toString()
Returns String representation of the ServiceConfig object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public java.lang.String getServiceName()
public java.lang.String getVersion()
public java.lang.String getComponentName()
public int getPriority()
public void setPriority(int priority) throws SSOException, SMSException
priority
- the priority to be assigned to the configuration
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic java.util.Set getSubConfigNames() throws SMSException
SMSException
- if there is an error accessing the data storepublic java.util.Set getSubConfigNames(java.lang.String pattern) throws SMSException
pattern
- pattern to match for sub-configuration names
SMSException
- if an error occurred while performing the operation.public ServiceConfig getSubConfig(java.lang.String subConfigName) throws SSOException, SMSException
subConfigName
- The name of the service's sub-configuration to
retrieve.
ServiceConfig
object corresponding to the
specified name of the service's sub-configuration.
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void addSubConfig(java.lang.String subConfigName, java.lang.String subConfigId, int priority, java.util.Map attrs) throws SMSException, SSOException
subConfigName
- the name of service sub-configuration to addsubConfigId
- type of service sub-configurationpriority
- the priority of the configurationattrs
- configuration parameters for the sub-configuration
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void removeSubConfig(java.lang.String subConfigName) throws SMSException, SSOException
subConfigName
- name of service sub-configuration to remove
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic java.util.Map getAttributes()
Map
contains the attribute names and their
corresponding values in the Map
is a
Set
that contains the values for the attribute.
This method picks up the default values for any attributes
not defined in the ServiceConfig
. The default values for
these attributes are picked up from the Service Schema.
If there is no default value defined, then this method
will still return the attribute-value pair, except that
the Set will be a Collections.EMPTY_SET.
This is distinct from an empty Set with no entries in it.
AN empty set represents an attribute whose value has
been set to an empty value by the application using
the setAttributes()
method.
Map
where key is the attribute name
and value is the Set
of attribute valuespublic void setAttributes(java.util.Map attrs) throws SMSException, SSOException
Map
contains the attribute names and their
corresponding values in the Map
is a
Set
that contains the values for the attribute.
This method will replace the existing attribute values with
the given one. For attributes that are not specified in
attrs
, it will not be modified.
attrs
- the Map
where key is the attribute name
and value is the Set
of attribute values
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void addAttribute(java.lang.String attrName, java.util.Set values) throws SMSException, SSOException
attrName
- the name of the attribute to addvalues
- the set of values to add
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void removeAttribute(java.lang.String attrName) throws SMSException, SSOException
attrName
- the name of the attribute to remove
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void removeAttributeValues(java.lang.String attrName, java.util.Set values) throws SMSException, SSOException
attrName
- the name of the attributevalues
- set of attribute values to remove from the given
attribute
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void replaceAttributeValue(java.lang.String attrName, java.lang.String oldValue, java.lang.String newValue) throws SMSException, SSOException
attrName
- the name of the attributeoldValue
- the old value to remove from the attributenewValue
- the new value to add to the attribute
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic void replaceAttributeValues(java.lang.String attrName, java.util.Set oldValues, java.util.Set newValues) throws SMSException, SSOException
attrName
- the name of the attributeoldValues
- the set of old values to remove from the attributenewValues
- the set of new values to add to the attribute
SMSException
- if there is an error occurred while performing the operation
SSOException
- if the user's single sign-on is invalid or expiredpublic java.lang.String getDN()
ServiceConfig
object.
ServiceConfig
object.public java.lang.String getLastModifiedTime() throws SMSException, SSOException
yyyyMMddhhmmss
SMSException
- if there is an error trying to read from the
data store
SSOException
- if the single sign-on token of the user is invalid.public java.lang.String toString()
ServiceConfig
object.
It returns attributes defined and sub configurations.
toString
in class java.lang.Object
ServiceConfig
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |