Class PolicyDefault
- All Implemented Interfaces:
IConfigTemplate
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract ConfigStore
Retrieves the configuration store of this default.abstract String
Retrieves the localizable name of this policy.abstract String
Retrieves the localizable description of this policy.abstract String
Retrieves the value of the given value property by name.abstract IDescriptor
getValueDescriptor
(Locale locale, String name) Retrieves the descriptor of the given property by name.abstract Enumeration<String>
Retrieves a list of names of the property.abstract void
init
(ConfigStore config) Initializes this default policy.abstract void
Populates the request with this policy default.abstract void
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
-
Constructor Details
-
PolicyDefault
public PolicyDefault()
-
-
Method Details
-
init
Initializes this default policy.- Parameters:
config
- configuration store for this default- Throws:
EProfileException
- failed to initialize
-
getConfigStore
Retrieves the configuration store of this default.- Returns:
- configuration store of this default policy
-
populate
Populates the request with this policy default.- Parameters:
request
- request to be populated- Throws:
EProfileException
- failed to populate
-
getName
Retrieves the localizable name of this policy.- Parameters:
locale
- locale of the end user- Returns:
- localized name of this default policy
-
getText
Retrieves the localizable description of this policy.- Parameters:
locale
- locale of the end user- Returns:
- localized description of this default policy
-
getValueNames
Retrieves a list of names of the property.- Returns:
- a list of property names. The values are of type java.lang.String
-
getValueDescriptor
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(String name, Locale locale, Request request, 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 String getValue(String name, Locale locale, Request 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
-