Package com.sun.identity.sm
Class PluginConfig
- java.lang.Object
-
- com.sun.identity.sm.PluginConfig
-
public class PluginConfig extends Object
The classPluginConfigprovides interfaces to manage the plugin configuration information of a service. It provides methods to get and set plugin configuration parameters for this service plugins.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPluginConfig(String name, ServiceConfigManager scm, com.sun.identity.sm.PluginConfigImpl pc)Protected constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String attrName, Set values)Adds a configuration parameter to the service plugin.MapgetAttributes()Returns the service plugin parameters.StringgetDN()Returns the LDAP DN represented by this plugin object.StringgetName()Returns the name of this service plugin.intgetPriority()Returns the priority assigned to the service plugin.StringgetServiceName()Returns the name of this service configuration.StringgetVersion()Returns the service versionvoidremoveAttribute(String attrName)Removes a configuration parameter from the service plugin.voidremoveAttributeValues(String attrName, Set values)Removes the specific values for the given configuration plugin.voidreplaceAttributeValue(String attrName, String oldValue, String newValue)Replaces old value of the configuration parameter with new value.voidreplaceAttributeValues(String attrName, Set oldValues, Set newValues)Replaces the old values of the configuration parameter with the new values.voidsetAttributes(Map attrs)Sets the service plugin parameters.voidsetPriority(int priority)Sets the priority to the service plugin.StringtoString()Returns String representation of the plugin object.protected voidvalidate()protected voidvalidatePluginConfig()
-
-
-
Constructor Detail
-
PluginConfig
protected PluginConfig(String name, ServiceConfigManager scm, com.sun.identity.sm.PluginConfigImpl pc) throws SMSException, SSOException
Protected constructor- Throws:
SMSExceptionSSOException
-
-
Method Detail
-
getName
public String getName()
Returns the name of this service plugin.- Returns:
- the name of this service plugin
-
getServiceName
public String getServiceName()
Returns the name of this service configuration.- Returns:
- the name of this service configuration
-
getVersion
public String getVersion()
Returns the service version- Returns:
- service version
-
getPriority
public int getPriority()
Returns the priority assigned to the service plugin.- Returns:
- the priority assigned to the service plugin
-
setPriority
public void setPriority(int priority) throws SSOException, SMSExceptionSets the priority to the service plugin.- Parameters:
priority- the priority to be assigned to the plugin- Throws:
SSOExceptionSMSException
-
getAttributes
public Map getAttributes()
Returns the service plugin parameters. The keys in theMapcontains the attribute names and their corresponding values in theMapis aSetthat contains the values for the attribute.- Returns:
- the
Mapwhere key is the attribute name and value is theSetof attribute values
-
setAttributes
public void setAttributes(Map attrs) throws SMSException, SSOException
Sets the service plugin parameters. The keys in theMapcontains the attribute names and their corresponding values in theMapis aSetthat contains the values for the attribute.- Parameters:
attrs- theMapwhere key is the attribute name and value is theSetof attribute values- Throws:
SMSExceptionSSOException
-
addAttribute
public void addAttribute(String attrName, Set values) throws SMSException, SSOException
Adds a configuration parameter to the service plugin.- Parameters:
attrName- the name of the attribute to addvalues- the set of values to add- Throws:
SMSExceptionSSOException
-
removeAttribute
public void removeAttribute(String attrName) throws SMSException, SSOException
Removes a configuration parameter from the service plugin.- Parameters:
attrName- the name of the attribute to remove- Throws:
SMSExceptionSSOException
-
removeAttributeValues
public void removeAttributeValues(String attrName, Set values) throws SMSException, SSOException
Removes the specific values for the given configuration plugin.- Parameters:
attrName- the name of the attributevalues- set of attribute values to remove from the given attribute- Throws:
SMSExceptionSSOException
-
replaceAttributeValue
public void replaceAttributeValue(String attrName, String oldValue, String newValue) throws SMSException, SSOException
Replaces old value of the configuration parameter with new value.- Parameters:
attrName- the name of the attributeoldValue- the old value to remove from the attributenewValue- the new value to add to the attribute- Throws:
SMSExceptionSSOException
-
replaceAttributeValues
public void replaceAttributeValues(String attrName, Set oldValues, Set newValues) throws SMSException, SSOException
Replaces the old values of the configuration parameter with the new values.- Parameters:
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- Throws:
SMSExceptionSSOException
-
getDN
public String getDN()
Returns the LDAP DN represented by this plugin object.
-
toString
public String toString()
Returns String representation of the plugin object. It returns attributes defined and sub configurations.
-
validate
protected void validate()
-
validatePluginConfig
protected void validatePluginConfig() throws SMSException- Throws:
SMSException
-
-