com.netscape.cms.profile.input
Class SubjectNameInput

java.lang.Object
  extended by com.netscape.cms.profile.input.EnrollInput
      extended by com.netscape.cms.profile.input.SubjectNameInput
All Implemented Interfaces:
IProfileInput, IConfigTemplate

public class SubjectNameInput
extends EnrollInput
implements IProfileInput

This class implements the subject name input that populates text fields to the enrollment page so that distinguished name parameters can be collected from the user.

The collected parameters could be used for fomulating the subject name in the certificate.

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

Field Summary
static java.lang.String CONFIG_C
           
static java.lang.String CONFIG_CN
           
static java.lang.String CONFIG_EMAIL
           
static java.lang.String CONFIG_O
           
static java.lang.String CONFIG_OU
           
static java.lang.String CONFIG_OU1
           
static java.lang.String CONFIG_OU2
           
static java.lang.String CONFIG_OU3
           
static java.lang.String CONFIG_UID
           
static java.lang.String VAL_C
           
static java.lang.String VAL_CN
           
static java.lang.String VAL_EMAIL
           
static java.lang.String VAL_O
           
static java.lang.String VAL_OU
           
static java.lang.String VAL_OU1
           
static java.lang.String VAL_OU2
           
static java.lang.String VAL_OU3
           
static java.lang.String VAL_UID
           
 
Fields inherited from class com.netscape.cms.profile.input.EnrollInput
mConfig, mConfigNames, mProfile, mSignedAuditLogger, mValueNames
 
Constructor Summary
SubjectNameInput()
           
 
Method Summary
 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.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.
 IDescriptor getValueDescriptor(java.util.Locale locale, java.lang.String name)
          Retrieves the descriptor of the given value parameter by name.
 java.util.Enumeration getValueNames()
          Returns selected value names based on the configuration.
 void init(IProfile profile, IConfigStore config)
          Initializes this default policy.
protected  void parseSubjectName(netscape.security.x509.X500Name subj, netscape.security.x509.X509CertInfo info, IRequest req)
           
 void populate(IProfileContext ctx, IRequest request)
          Populates the request with this policy default.
 
Methods inherited from class com.netscape.cms.profile.input.EnrollInput
addConfigName, addValueName, audit, auditSubjectID, getConfigNames, getConfigStore, getDefaultConfig, getLocale, getValue, setConfig, setValue, verifyPOP
 
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.profile.IProfileInput
getConfigStore, getValue, setValue
 
Methods inherited from interface com.netscape.certsrv.property.IConfigTemplate
getConfigNames, setConfig
 

Field Detail

CONFIG_UID

public static final java.lang.String CONFIG_UID
See Also:
Constant Field Values

CONFIG_EMAIL

public static final java.lang.String CONFIG_EMAIL
See Also:
Constant Field Values

CONFIG_CN

public static final java.lang.String CONFIG_CN
See Also:
Constant Field Values

CONFIG_OU3

public static final java.lang.String CONFIG_OU3
See Also:
Constant Field Values

CONFIG_OU2

public static final java.lang.String CONFIG_OU2
See Also:
Constant Field Values

CONFIG_OU1

public static final java.lang.String CONFIG_OU1
See Also:
Constant Field Values

CONFIG_OU

public static final java.lang.String CONFIG_OU
See Also:
Constant Field Values

CONFIG_O

public static final java.lang.String CONFIG_O
See Also:
Constant Field Values

CONFIG_C

public static final java.lang.String CONFIG_C
See Also:
Constant Field Values

VAL_UID

public static final java.lang.String VAL_UID
See Also:
Constant Field Values

VAL_EMAIL

public static final java.lang.String VAL_EMAIL
See Also:
Constant Field Values

VAL_CN

public static final java.lang.String VAL_CN
See Also:
Constant Field Values

VAL_OU3

public static final java.lang.String VAL_OU3
See Also:
Constant Field Values

VAL_OU2

public static final java.lang.String VAL_OU2
See Also:
Constant Field Values

VAL_OU1

public static final java.lang.String VAL_OU1
See Also:
Constant Field Values

VAL_OU

public static final java.lang.String VAL_OU
See Also:
Constant Field Values

VAL_O

public static final java.lang.String VAL_O
See Also:
Constant Field Values

VAL_C

public static final java.lang.String VAL_C
See Also:
Constant Field Values
Constructor Detail

SubjectNameInput

public SubjectNameInput()
Method Detail

init

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

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

getName

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

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

getText

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

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

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
Overrides:
getConfig in class EnrollInput
Returns:
parameter

getValueNames

public java.util.Enumeration getValueNames()
Returns selected value names based on the configuration.

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

populate

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

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

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
Overrides:
getConfigDescriptor in class EnrollInput
Parameters:
locale - user locale
name - configuration parameter name
Returns:
descriptor

getValueDescriptor

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

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

parseSubjectName

protected void parseSubjectName(netscape.security.x509.X500Name subj,
                                netscape.security.x509.X509CertInfo info,
                                IRequest req)
                         throws EProfileException
Throws:
EProfileException