Class PolicyDefault

java.lang.Object
com.netscape.cms.profile.def.PolicyDefault
All Implemented Interfaces:
IConfigTemplate

public abstract class PolicyDefault extends Object implements IConfigTemplate
This represents a default policy that populates the request with additional values.

During request submission process, a default policy is invoked to populate the default values in the request. The default values will later on be used for execution. The default values are like the parameters for the request.

This policy is called in 2 places. For automated enrollment request, this policy is invoked to populate the HTTP parameters into the request. For request that cannot be executed immediately, this policy will be invoked again right after the agent's approval.

Each default policy may contain zero or more properties that describe the default value. For example, a X509 Key can be described by its key type, key length, and key data. The properties help to describe the default value into human readable values.

Version:
$Revision$, $Date$
  • Constructor Details

    • PolicyDefault

      public PolicyDefault()
  • Method Details

    • init

      public abstract void init(ConfigStore config) throws EProfileException
      Initializes this default policy.
      Parameters:
      config - configuration store for this default
      Throws:
      EProfileException - failed to initialize
    • getConfigStore

      public abstract ConfigStore getConfigStore()
      Retrieves the configuration store of this default.
      Returns:
      configuration store of this default policy
    • populate

      public abstract void populate(Request request) throws EProfileException
      Populates the request with this policy default.
      Parameters:
      request - request to be populated
      Throws:
      EProfileException - failed to populate
    • getName

      public abstract String getName(Locale locale)
      Retrieves the localizable name of this policy.
      Parameters:
      locale - locale of the end user
      Returns:
      localized name of this default policy
    • getText

      public abstract String getText(Locale locale)
      Retrieves the localizable description of this policy.
      Parameters:
      locale - locale of the end user
      Returns:
      localized description of this default policy
    • getValueNames

      public abstract Enumeration<String> getValueNames()
      Retrieves a list of names of the property.
      Returns:
      a list of property names. The values are of type java.lang.String
    • getValueDescriptor

      public abstract IDescriptor getValueDescriptor(Locale locale, String name)
      Retrieves the descriptor of the given property by name. The descriptor contains syntax information.
      Parameters:
      locale - locale of the end user
      name - name of property
      Returns:
      descriptor of the property
    • setValue

      public abstract void setValue(String name, Locale locale, Request request, String value) throws EPropertyException
      Sets the value of the given value property by name.
      Parameters:
      name - name of property
      locale - locale of the end user
      request - request
      value - value to be set in the given request
      Throws:
      EPropertyException - failed to set property
    • getValue

      public abstract String getValue(String name, Locale locale, Request request) throws EPropertyException
      Retrieves the value of the given value property by name.
      Parameters:
      name - name of property
      locale - locale of the end user
      request - request
      Throws:
      EPropertyException - failed to get property