Class DefaultValues

java.lang.Object
com.sun.identity.sm.DefaultValues

@SupportedAll public abstract class DefaultValues extends Object
The abstract class DefaultValues provides a mechanism for services to obtain their default values dynamically instead of being statically defined in the service XML file stored in the directory.

An implementation of this class must be specified in the service configuration XML file in the definition of the respective attribute schema. Instead of providing the default values in the XML configuration file, the class name must be specified within the XML node DefaultValuesClassName.

  • Constructor Details

    • DefaultValues

      public DefaultValues()
  • Method Details

    • getDefaultValues

      public abstract Set<String> getDefaultValues()
      Abstract method that must be implemented by a class extending this interface, and should return the default values for the attribute.
      Returns:
      defaults values for the attribute as a java.util.Set
    • getDefaultValues

      public Set<String> getDefaultValues(Map envParams)
      Returns a Set of default values for the attribute, given the environment parameters. The default implementation calls the interface getDefaultValues() which takes no parameters. The class extending this class can override this method to take advantage of the additional environment parameters.
      Returns:
      defaults values for the attribute as a java.util.Set
    • getAttributeName

      public final String getAttributeName()
      Returns the name of the attribute for which the default values will be returned.
      Returns:
      the name of attribute for which the default values are returned
    • getConfiguredKeyValues

      public final Map<String,Set<String>> getConfiguredKeyValues()
      Returns the configured key-value pairs for the class in the service's configuration file
      Returns:
      key-value pairs configured for this class in the service schema XML file
    • getAttributeSchemaNode

      public final Node getAttributeSchemaNode()
      Returns the XML AttributeSchema node associated with this attribute
      Returns:
      XML node of AttributeSchema