| java.lang.Object com.sun.ssoadapter.config.ConfigurationFactory
ConfigurationFactory | public class ConfigurationFactory implements ConfigurationConstants(Code) | | This class is used to create, destroy, and manipulate
configurations and instances of Configuration objects.
A ConfigurationFactory is associated with the following:
- A DSAME service.
- An attribute within that service that contains configuration information,
where this information is encoded as multiple URLs. Typically,
this attribute is defined as a DSAME "User" attribute.
- An attribute within that service that contains a "Configuration
Description". Typically, this attribute is defined as a DSAME
"Organization" attribute.
A cache of ConfigurationFactory objects is maintained, such that only
a single instance of a ConfigurationFactory is created for each combination
of the above listed values, i.e., service, configuration attribute name, and
configuration description attribute name.
A ConfigurationFactory manages a cache of Configuration objects that
are derived from the aforementioned information. These Configuration
objects are managed on a per user basis.
version: 1.0 See Also: com.sun.ssoadapter.config.ConfigurationException |
Method Summary | |
public Configuration | computeMergedConfiguration(Configuration config, SSOAdapterSession session) Merge the given configuration with it's
Configuration Description. | public Enumeration | getConfigurationNames(SSOAdapterSession session) Returns an Enumeration of configuration names available to the user.
Each value of the Enumeration is a String representing the name
of a configuration created by and/or available to the user.
The values of the enumeration are sorted according to the
rules of the TreeMap class.
Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. | public static ConfigurationFactory | getInstance(String serviceName, String rootAttributeName) Returns (and instantiates if necessary), an instance of ConfigurationFactory.
The ConfigurationFactory returned by this method will manipulate
Configuration objects that are derived from DSAME information referenced
by the method parameters, but the configuration description attribute
name will default to "sunConfigurationDescription".
Parameters: serviceName - Identifies the DSAME service that contains configurationinformation. Parameters: rootAttributeName - Identifies the DSAME attribute that containsthe user specific configuration information. | public static ConfigurationFactory | getInstance(String serviceName, String rootAttributeName, String descAttributeName) Returns (and instantiates if necessary), an instance of ConfigurationFactory.
The ConfigurationFactory returned by this method will manipulate
Configuration objects that are derived from DSAME information referenced
by the method parameters.
Parameters: serviceName - Identifies the DSAME service that contains configurationinformation. Parameters: rootAttributeName - Identifies the DSAME attribute that containsthe user specific configuration information. Parameters: descAttributeName - Identifies the DSAME attribute that containsa configuration description that may be usedto control the construction of Configurationobjects. | public boolean | isConfigurationUserEditable(String configName, SSOAdapterSession session) Determines if the Configuration named by "configName", that was or would be
created by this instance of ConfigurationFactory, contains any information
provided by the user. | public boolean | isMergeDynamicConfigurations() | public Configuration | readConfiguration(String configName, boolean useDesc, SSOAdapterSession session) Returns a Configuration object that is constructed based upon information
contained in the DSAME service and attributes associated with this
ConfigurationFactory.
If the user has previously requested this Configuration, it is returned
from a cache, otherwise, a Configuration object is constructed in the
following fashion:
- The multi-valued "User" attribute is read based upon the serviceName
and rootAttributeName associated with this ConfigurationFactory.
| public void | removeConfiguration(String configName, SSOAdapterSession session) Removes a configuration from the DSAME service and attribute associated
with this ConfigurationFactory. | public void | setMergeDynamicConfigurations(boolean flag) | public void | writeConfiguration(Configuration config, SSOAdapterSession session) Writes a configuration into the DSAME service and attribute associated
with this ConfigurationFactory.
If the Configuration object specifies a Configuration Description,
then it is expected that the Configuration Description specifies
which values belong to the user, and only those values will be
written. |
DEFAULT_DESC_ATTR | final public static String DEFAULT_DESC_ATTR(Code) | | |
getConfigurationNames | public Enumeration getConfigurationNames(SSOAdapterSession session)(Code) | | Returns an Enumeration of configuration names available to the user.
Each value of the Enumeration is a String representing the name
of a configuration created by and/or available to the user.
The values of the enumeration are sorted according to the
rules of the TreeMap class.
Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. Enumeration An enumeration of names. Returns null if problem occurs. |
getInstance | public static ConfigurationFactory getInstance(String serviceName, String rootAttributeName)(Code) | | Returns (and instantiates if necessary), an instance of ConfigurationFactory.
The ConfigurationFactory returned by this method will manipulate
Configuration objects that are derived from DSAME information referenced
by the method parameters, but the configuration description attribute
name will default to "sunConfigurationDescription".
Parameters: serviceName - Identifies the DSAME service that contains configurationinformation. Parameters: rootAttributeName - Identifies the DSAME attribute that containsthe user specific configuration information. ConfigurationFactory Returns factory if successful, null otherwise. |
getInstance | public static ConfigurationFactory getInstance(String serviceName, String rootAttributeName, String descAttributeName)(Code) | | Returns (and instantiates if necessary), an instance of ConfigurationFactory.
The ConfigurationFactory returned by this method will manipulate
Configuration objects that are derived from DSAME information referenced
by the method parameters.
Parameters: serviceName - Identifies the DSAME service that contains configurationinformation. Parameters: rootAttributeName - Identifies the DSAME attribute that containsthe user specific configuration information. Parameters: descAttributeName - Identifies the DSAME attribute that containsa configuration description that may be usedto control the construction of Configurationobjects. ConfigurationFactory Returns factory if successful, null otherwise. |
isConfigurationUserEditable | public boolean isConfigurationUserEditable(String configName, SSOAdapterSession session) throws ConfigurationException(Code) | | Determines if the Configuration named by "configName", that was or would be
created by this instance of ConfigurationFactory, contains any information
provided by the user.
This is equivalent to asking: "Is this Configuration user editable"?
true, if Configuration is user derived, false otherwise. Parameters: configName - Name of the Configuration to be tested. Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. throws: com.sun.ssoadapter.config.ConfigurationException - |
isMergeDynamicConfigurations | public boolean isMergeDynamicConfigurations()(Code) | | |
readConfiguration | public Configuration readConfiguration(String configName, boolean useDesc, SSOAdapterSession session) throws ConfigurationException(Code) | | Returns a Configuration object that is constructed based upon information
contained in the DSAME service and attributes associated with this
ConfigurationFactory.
If the user has previously requested this Configuration, it is returned
from a cache, otherwise, a Configuration object is constructed in the
following fashion:
- The multi-valued "User" attribute is read based upon the serviceName
and rootAttributeName associated with this ConfigurationFactory. Each
value of this attribute represents a unique configuration. Processing
of this information will be described from the perspective of a
particular configuration, though actual implementation is somewhat
different.
- A "raw" Configuration object is constructed from the information
stored in the DSAME "User" attribute specified by this
ConfigurationFactory's rootAttributeName.
- If the "useDesc" parameter of this method is "false", the raw
Configuration object is returned and processing is completed, otherwise...
- If the "useDesc" parameter of this method is "true", the configuration
description information identified by the descAttributeName of this
factory and the value of the "configDesc" property of the raw
Configuration previously read will be retrieved.
- The configuration description is actually a special type of
configuration, that can control the configuration information
that is used on behalf of a user. It specifies what information
may be provided by the user and what information must be derived
from the configuration description. Ultimately, a "merged" Configuration
object is created and is returned as the intended configuration.
- Note: It is also possible that a Configuration object may be constructed
soley from data provided by the Configuration Description, with no
data derived from the user attribute.
Parameters: configName - Specifies the name of the configuration to retrieve. Parameters: useDesc - If "true", a "merged" Configuration is returned, otherwise,the "raw" Configuration is returned. Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. throws: com.sun.ssoadapter.config.ConfigurationException - |
removeConfiguration | public void removeConfiguration(String configName, SSOAdapterSession session) throws ConfigurationException(Code) | | Removes a configuration from the DSAME service and attribute associated
with this ConfigurationFactory.
Removal of a configuration will result in a notification of all
listeners registered with a Configuration object that was created
by this ConfigurationFactory for the specified configName.
Parameters: configName - Name of the configuration to remove. Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. throws: com.sun.ssoadapter.config.ConfigurationException - |
setMergeDynamicConfigurations | public void setMergeDynamicConfigurations(boolean flag)(Code) | | |
writeConfiguration | public void writeConfiguration(Configuration config, SSOAdapterSession session) throws ConfigurationException(Code) | | Writes a configuration into the DSAME service and attribute associated
with this ConfigurationFactory.
If the Configuration object specifies a Configuration Description,
then it is expected that the Configuration Description specifies
which values belong to the user, and only those values will be
written. If a Configuration Description is not specified, the
entire Configuration is written.
Parameters: config - The Configuration to be written. Parameters: session - Contains information which is presumed to be sufficientto create an SSOToken, that is used to identifythe user on who's behalf the session is being processed. throws: com.sun.ssoadapter.config.ConfigurationException - |
|
|