public abstract class PolicyDefault extends java.lang.Object implements 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.
Constructor and Description |
---|
PolicyDefault() |
Modifier and Type | Method and 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfig, getConfigDescriptor, getConfigNames, setConfig
public abstract void init(IConfigStore config) throws EProfileException
config
- configuration store for this defaultEProfileException
- failed to initializepublic abstract IConfigStore getConfigStore()
public abstract void populate(IRequest request) throws EProfileException
request
- request to be populatedEProfileException
- failed to populatepublic abstract java.lang.String getName(java.util.Locale locale)
locale
- locale of the end userpublic abstract java.lang.String getText(java.util.Locale locale)
locale
- locale of the end userpublic abstract java.util.Enumeration<java.lang.String> getValueNames()
public abstract IDescriptor getValueDescriptor(java.util.Locale locale, java.lang.String name)
locale
- locale of the end username
- name of propertypublic abstract void setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value) throws EPropertyException
name
- name of propertylocale
- locale of the end userrequest
- requestvalue
- value to be set in the given requestEPropertyException
- failed to set propertypublic abstract java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request) throws EPropertyException
name
- name of propertylocale
- locale of the end userrequest
- requestEPropertyException
- failed to get property