Class PolicyDefault
- java.lang.Object
-
- com.netscape.cms.profile.def.PolicyDefault
-
- All Implemented Interfaces:
IConfigTemplate
public abstract class PolicyDefault extends java.lang.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 Summary
Constructors Constructor Description PolicyDefault()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract IConfigStore
getConfigStore()
Retrieves the configuration store of this default.abstract java.lang.String
getName(java.util.Locale locale)
Retrieves the localizable name of this policy.abstract java.lang.String
getText(java.util.Locale locale)
Retrieves the localizable description of this policy.abstract java.lang.String
getValue(java.lang.String name, java.util.Locale locale, IRequest request)
Retrieves the value of the given value property by name.abstract IDescriptor
getValueDescriptor(java.util.Locale locale, java.lang.String name)
Retrieves the descriptor of the given property by name.abstract java.util.Enumeration<java.lang.String>
getValueNames()
Retrieves a list of names of the property.abstract void
init(IConfigStore config)
Initializes this default policy.abstract void
populate(IRequest request)
Populates the request with this policy default.abstract void
setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value)
Sets the value of the given value property by name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.netscape.certsrv.property.IConfigTemplate
getConfig, getConfigDescriptor, getConfigNames, setConfig
-
-
-
-
Method Detail
-
init
public abstract void init(IConfigStore config) throws EProfileException
Initializes this default policy.- Parameters:
config
- configuration store for this default- Throws:
EProfileException
- failed to initialize
-
getConfigStore
public abstract IConfigStore getConfigStore()
Retrieves the configuration store of this default.- Returns:
- configuration store of this default policy
-
populate
public abstract void populate(IRequest request) throws EProfileException
Populates the request with this policy default.- Parameters:
request
- request to be populated- Throws:
EProfileException
- failed to populate
-
getName
public abstract java.lang.String getName(java.util.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 java.lang.String getText(java.util.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 java.util.Enumeration<java.lang.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(java.util.Locale locale, java.lang.String name)
Retrieves the descriptor of the given property by name. The descriptor contains syntax information.- Parameters:
locale
- locale of the end username
- name of property- Returns:
- descriptor of the property
-
setValue
public abstract void setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value) throws EPropertyException
Sets the value of the given value property by name.- Parameters:
name
- name of propertylocale
- locale of the end userrequest
- requestvalue
- value to be set in the given request- Throws:
EPropertyException
- failed to set property
-
getValue
public abstract java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request) throws EPropertyException
Retrieves the value of the given value property by name.- Parameters:
name
- name of propertylocale
- locale of the end userrequest
- request- Throws:
EPropertyException
- failed to get property
-
-