com.netscape.cms.profile.input
Class EnrollInput

java.lang.Object
  extended by com.netscape.cms.profile.input.EnrollInput
All Implemented Interfaces:
IProfileInput, IConfigTemplate
Direct Known Subclasses:
CertReqInput, CMCCertReqInput, DualKeyGenInput, FileSigningInput, GenericInput, ImageInput, KeyGenInput, nsHKeyCertReqInput, nsNKeyCertReqInput, SerialNumRenewInput, SubjectDNInput, SubjectNameInput, SubmitterInfoInput

public abstract class EnrollInput
extends java.lang.Object
implements IProfileInput

This class implements the base enrollment input.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
protected  IConfigStore mConfig
           
protected  java.util.Vector mConfigNames
           
protected  IProfile mProfile
           
protected  ILogger mSignedAuditLogger
           
protected  java.util.Vector mValueNames
           
 
Constructor Summary
EnrollInput()
           
 
Method Summary
 void addConfigName(java.lang.String name)
           
 void addValueName(java.lang.String name)
           
protected  void audit(java.lang.String msg)
          Signed Audit Log This method is inherited by all extended "CMSServlet"s, and is called to store messages to the signed audit log.
protected  java.lang.String auditSubjectID()
          Signed Audit Log Subject ID This method is inherited by all extended "CMSServlet"s, and is called to obtain the "SubjectID" for a signed audit log message.
 java.lang.String getConfig(java.lang.String name)
          Retrieves configuration parameter by name.
 IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
          Returns the descriptors of configuration parameter.
 java.util.Enumeration getConfigNames()
          Returns a list of configuration parameter names.
 IConfigStore getConfigStore()
          Returns configuration store.
 java.lang.String getDefaultConfig(java.lang.String name)
           
 java.util.Locale getLocale(IRequest request)
           
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.
 java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request)
          Retrieves value from the request.
abstract  IDescriptor getValueDescriptor(java.util.Locale locale, java.lang.String name)
          Retrieves the descriptor of the given value property by name.
 java.util.Enumeration getValueNames()
          Retrieves a list of names of the value parameter.
 void init(IProfile profile, IConfigStore config)
          Initializes this default policy.
abstract  void populate(IProfileContext ctx, IRequest request)
          Populates the request with this policy default.
 void setConfig(java.lang.String name, java.lang.String value)
          Sets configuration parameter.
 void setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value)
          Sets the value of the given value parameter by name.
 void verifyPOP(java.util.Locale locale, org.mozilla.jss.pkix.crmf.CertReqMsg certReqMsg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mConfig

protected IConfigStore mConfig

mValueNames

protected java.util.Vector mValueNames

mConfigNames

protected java.util.Vector mConfigNames

mProfile

protected IProfile mProfile

mSignedAuditLogger

protected ILogger mSignedAuditLogger
Constructor Detail

EnrollInput

public EnrollInput()
Method Detail

init

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

Specified by:
init in interface IProfileInput
Parameters:
profile - owner of this input
config - configuration store
Throws:
EProfileException - failed to initialize

getConfigStore

public IConfigStore getConfigStore()
Description copied from interface: IProfileInput
Returns configuration store.

Specified by:
getConfigStore in interface IProfileInput
Returns:
configuration store

populate

public abstract void populate(IProfileContext ctx,
                              IRequest request)
                       throws EProfileException
Populates the request with this policy default.

Specified by:
populate in interface IProfileInput
Parameters:
ctx - profile context
request - request
Throws:
EProfileException - failed to populate

getName

public abstract java.lang.String getName(java.util.Locale locale)
Retrieves the localizable name of this policy.

Specified by:
getName in interface IProfileInput
Parameters:
locale - user locale
Returns:
localized input name

getText

public abstract java.lang.String getText(java.util.Locale locale)
Retrieves the localizable description of this policy.

Specified by:
getText in interface IProfileInput
Parameters:
locale - user locale
Returns:
localized input description

getValueDescriptor

public abstract IDescriptor getValueDescriptor(java.util.Locale locale,
                                               java.lang.String name)
Retrieves the descriptor of the given value property by name.

Specified by:
getValueDescriptor in interface IProfileInput
Parameters:
locale - user locale
name - property name
Returns:
descriptor of the property

addValueName

public void addValueName(java.lang.String name)

getValueNames

public java.util.Enumeration getValueNames()
Retrieves a list of names of the value parameter.

Specified by:
getValueNames in interface IProfileInput
Returns:
a list of property names

addConfigName

public void addConfigName(java.lang.String name)

getConfigNames

public java.util.Enumeration getConfigNames()
Description copied from interface: IConfigTemplate
Returns a list of configuration parameter names.

Specified by:
getConfigNames in interface IConfigTemplate
Returns:
parameter names

setConfig

public void setConfig(java.lang.String name,
                      java.lang.String value)
               throws EPropertyException
Description copied from interface: IConfigTemplate
Sets configuration parameter.

Specified by:
setConfig in interface IConfigTemplate
Parameters:
name - parameter name
value - parameter value
Throws:
EPropertyException - failed to set parameter

getConfig

public java.lang.String getConfig(java.lang.String name)
Description copied from interface: IConfigTemplate
Retrieves configuration parameter by name.

Specified by:
getConfig in interface IConfigTemplate
Returns:
parameter

getDefaultConfig

public java.lang.String getDefaultConfig(java.lang.String name)

getValue

public java.lang.String getValue(java.lang.String name,
                                 java.util.Locale locale,
                                 IRequest request)
                          throws EProfileException
Description copied from interface: IProfileInput
Retrieves value from the request.

Specified by:
getValue in interface IProfileInput
Parameters:
name - property name
locale - user locale
request - request
Throws:
EProfileException - failed to get value

setValue

public 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 parameter by name.

Specified by:
setValue in interface IProfileInput
Parameters:
name - property name
locale - user locale
request - request
value - value
Throws:
EPropertyException

getLocale

public java.util.Locale getLocale(IRequest request)

getConfigDescriptor

public IDescriptor getConfigDescriptor(java.util.Locale locale,
                                       java.lang.String name)
Description copied from interface: IConfigTemplate
Returns the descriptors of configuration parameter.

Specified by:
getConfigDescriptor in interface IConfigTemplate
Parameters:
locale - user locale
name - configuration parameter name
Returns:
descriptor

verifyPOP

public void verifyPOP(java.util.Locale locale,
                      org.mozilla.jss.pkix.crmf.CertReqMsg certReqMsg)
               throws EProfileException
Throws:
EProfileException

audit

protected void audit(java.lang.String msg)
Signed Audit Log This method is inherited by all extended "CMSServlet"s, and is called to store messages to the signed audit log.

Parameters:
msg - signed audit log message

auditSubjectID

protected java.lang.String auditSubjectID()
Signed Audit Log Subject ID This method is inherited by all extended "CMSServlet"s, and is called to obtain the "SubjectID" for a signed audit log message.

Returns:
id string containing the signed audit log message SubjectID