com.netscape.certsrv.profile
Interface IPolicyDefault

All Superinterfaces:
IConfigTemplate
All Known Subinterfaces:
ICertInfoPolicyDefault
All Known Implementing Classes:
AuthInfoAccessExtDefault, AuthorityKeyIdentifierExtDefault, AuthTokenSubjectNameDefault, AutoAssignDefault, BasicConstraintsExtDefault, CAEnrollDefault, CAValidityDefault, CertificatePoliciesExtDefault, CertificateVersionDefault, CRLDistributionPointsExtDefault, EnrollDefault, EnrollExtDefault, ExtendedKeyUsageExtDefault, FreshestCRLExtDefault, GenericExtDefault, ImageDefault, InhibitAnyPolicyExtDefault, IssuerAltNameExtDefault, KeyUsageExtDefault, NameConstraintsExtDefault, NoDefault, NSCCommentExtDefault, NSCertTypeExtDefault, nsHKeySubjectNameDefault, nsNKeySubjectNameDefault, nsTokenDeviceKeySubjectNameDefault, nsTokenUserKeySubjectNameDefault, OCSPNoCheckExtDefault, PolicyConstraintsExtDefault, PolicyMappingsExtDefault, PrivateKeyUsagePeriodExtDefault, SigningAlgDefault, SubjectAltNameExtDefault, SubjectDirAttributesExtDefault, SubjectInfoAccessExtDefault, SubjectKeyIdentifierExtDefault, SubjectNameDefault, UserExtensionDefault, UserKeyDefault, UserSigningAlgDefault, UserSubjectNameDefault, UserValidityDefault, ValidityDefault

public interface IPolicyDefault
extends 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: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Method Summary
 IConfigStore getConfigStore()
          Retrieves the configuration store of this default.
 java.lang.String getName(java.util.Locale locale)
          Retrieves the localizable name of this policy.
 java.lang.String getText(java.util.Locale locale)
          Retrieves the localizable description of this policy.
 java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request)
          Retrieves the value of the given value property by name.
 IDescriptor getValueDescriptor(java.util.Locale locale, java.lang.String name)
          Retrieves the descriptor of the given property by name.
 java.util.Enumeration getValueNames()
          Retrieves a list of names of the property.
 void init(IProfile profile, IConfigStore config)
          Initializes this default policy.
 void populate(IRequest request)
          Populates the request with this policy default.
 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 interface com.netscape.certsrv.property.IConfigTemplate
getConfig, getConfigDescriptor, getConfigNames, setConfig
 

Method Detail

init

void init(IProfile profile,
          IConfigStore config)
          throws EProfileException
Initializes this default policy.

Parameters:
profile - owner of this default policy
config - configuration store for this default
Throws:
EProfileException - failed to initialize

getConfigStore

IConfigStore getConfigStore()
Retrieves the configuration store of this default.

Returns:
configuration store of this default policy

populate

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

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

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

java.util.Enumeration getValueNames()
Retrieves a list of names of the property.

Returns:
a list of property names. The values are of type java.lang.String

getValueDescriptor

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 user
name - name of property
Returns:
descriptor of the property

setValue

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 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

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 property
locale - locale of the end user
request - request
Throws:
EPropertyException - failed to get property