public abstract class EnrollDefault extends java.lang.Object implements IPolicyDefault, ICertInfoPolicyDefault
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GN_ANY_NAME |
static java.lang.String |
GN_DIRECTORY_NAME |
static java.lang.String |
GN_DNS_NAME |
static java.lang.String |
GN_EDI_NAME |
static java.lang.String |
GN_IP_NAME |
static java.lang.String |
GN_OID_NAME |
static java.lang.String |
GN_RFC822_NAME |
static java.lang.String |
GN_URI_NAME |
protected IConfigStore |
mConfig |
protected java.util.Vector |
mConfigNames |
protected java.util.Vector |
mValueNames |
static java.lang.String |
PROP_NAME |
Constructor and Description |
---|
EnrollDefault() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigName(java.lang.String name) |
protected void |
addExtension(java.lang.String name,
netscape.security.x509.Extension ext,
netscape.security.x509.X509CertInfo info) |
void |
addValueName(java.lang.String name) |
protected java.lang.String |
buildRecords(java.util.Vector recs) |
protected void |
deleteExtension(java.lang.String name,
netscape.security.x509.X509CertInfo info) |
protected java.lang.StringBuffer |
escapeValueRfc1779(java.lang.String v,
boolean doubleEscape) |
protected boolean |
getBoolean(java.lang.String value) |
byte[] |
getBytes(java.lang.String string)
Converts string containing pairs of characters in the range of '0'
to '9', 'a' to 'f' to an array of bytes such that each pair of
characters in the string represents an individual byte
|
java.lang.String |
getConfig(java.lang.String name)
Retrieves configuration parameter by name.
|
protected boolean |
getConfigBoolean(java.lang.String value) |
IDescriptor |
getConfigDescriptor(java.util.Locale locale,
java.lang.String name)
Returns the descriptors of configuration parameter.
|
protected int |
getConfigInt(java.lang.String value) |
java.util.Enumeration |
getConfigNames()
Returns a list of configuration parameter names.
|
IConfigStore |
getConfigStore()
Retrieves the configuration store of this default.
|
protected netscape.security.x509.Extension |
getExtension(java.lang.String name,
netscape.security.x509.CertificateExtensions exts) |
protected netscape.security.x509.Extension |
getExtension(java.lang.String name,
netscape.security.x509.X509CertInfo info) |
protected java.lang.String |
getGeneralNameType(netscape.security.x509.GeneralName gn) |
protected java.lang.String |
getGeneralNameValue(netscape.security.x509.GeneralName gn) |
protected int |
getInt(java.lang.String value) |
java.util.Locale |
getLocale(IRequest request) |
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 the value of the given value
property by name.
|
abstract java.lang.String |
getValue(java.lang.String name,
java.util.Locale locale,
netscape.security.x509.X509CertInfo info)
Retrieves certificate template values and returns them to
the approval page.
|
IDescriptor |
getValueDescriptor(java.lang.String name) |
java.util.Enumeration |
getValueNames()
Retrieves a list of names of the property.
|
void |
init(IProfile profile,
IConfigStore config)
Initializes this default policy.
|
protected boolean |
isGeneralNameType(java.lang.String nameType) |
protected boolean |
isGeneralNameValid(java.lang.String name) |
protected boolean |
isOptional(java.lang.String value) |
boolean |
isValidOID(java.lang.String oid)
Check if a object identifier in string form is valid,
that is a string in the form n.n.n.n and der encode and decode-able.
|
protected java.lang.String |
mapPattern(IRequest request,
java.lang.String pattern) |
protected netscape.security.x509.GeneralNameInterface |
parseGeneralName(java.lang.String name) |
protected netscape.security.x509.GeneralNameInterface |
parseGeneralName(java.lang.String nameType,
java.lang.String nameValue) |
protected java.util.Vector |
parseRecords(java.lang.String value) |
void |
populate(IRequest request)
Populates the request with this policy default.
|
abstract void |
populate(IRequest request,
netscape.security.x509.X509CertInfo info)
Populates attributes into the certificate template.
|
protected void |
refreshConfigAndValueNames() |
protected void |
replaceExtension(java.lang.String name,
netscape.security.x509.Extension ext,
netscape.security.x509.X509CertInfo info) |
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 property by name.
|
abstract void |
setValue(java.lang.String name,
java.util.Locale locale,
netscape.security.x509.X509CertInfo info,
java.lang.String value)
Sets values from the approval page into certificate template.
|
java.lang.String |
toGeneralNameString(netscape.security.x509.GeneralName gn) |
java.lang.String |
toHexString(byte[] data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueDescriptor
public static final java.lang.String PROP_NAME
public static final java.lang.String GN_RFC822_NAME
public static final java.lang.String GN_DNS_NAME
public static final java.lang.String GN_URI_NAME
public static final java.lang.String GN_IP_NAME
public static final java.lang.String GN_DIRECTORY_NAME
public static final java.lang.String GN_EDI_NAME
public static final java.lang.String GN_ANY_NAME
public static final java.lang.String GN_OID_NAME
protected IConfigStore mConfig
protected java.util.Vector mConfigNames
protected java.util.Vector mValueNames
public java.util.Enumeration getConfigNames()
IConfigTemplate
getConfigNames
in interface IConfigTemplate
public IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
IConfigTemplate
getConfigDescriptor
in interface IConfigTemplate
locale
- user localename
- configuration parameter namepublic void addConfigName(java.lang.String name)
public void setConfig(java.lang.String name, java.lang.String value) throws EPropertyException
IConfigTemplate
setConfig
in interface IConfigTemplate
name
- parameter namevalue
- parameter valueEPropertyException
- failed to set parameterpublic java.lang.String getConfig(java.lang.String name)
IConfigTemplate
getConfig
in interface IConfigTemplate
public void init(IProfile profile, IConfigStore config) throws EProfileException
IPolicyDefault
init
in interface IPolicyDefault
profile
- owner of this default policyconfig
- configuration store for this defaultEProfileException
- failed to initializepublic abstract java.lang.String getText(java.util.Locale locale)
getText
in interface IPolicyDefault
locale
- locale of the end userpublic IConfigStore getConfigStore()
IPolicyDefault
getConfigStore
in interface IPolicyDefault
public java.lang.String getName(java.util.Locale locale)
IPolicyDefault
getName
in interface IPolicyDefault
locale
- locale of the end userpublic abstract void populate(IRequest request, netscape.security.x509.X509CertInfo info) throws EProfileException
populate
in interface ICertInfoPolicyDefault
request
- enrollment requestinfo
- certificate templateEProfileException
- failed to populate attributes
into requestpublic abstract void setValue(java.lang.String name, java.util.Locale locale, netscape.security.x509.X509CertInfo info, java.lang.String value) throws EPropertyException
name
- name of the attributelocale
- user localeinfo
- certificate templatevalue
- attribute valueEProfileException
- failed to set attributes
into requestEPropertyException
public abstract java.lang.String getValue(java.lang.String name, java.util.Locale locale, netscape.security.x509.X509CertInfo info) throws EPropertyException
name
- name of the attributelocale
- user localeinfo
- certificate templateEProfileException
- failed to get attributes
from requestEPropertyException
public void populate(IRequest request) throws EProfileException
populate
in interface IPolicyDefault
request
- request to be populatedEProfileException
- failed to populatepublic void addValueName(java.lang.String name)
public java.util.Enumeration getValueNames()
IPolicyDefault
getValueNames
in interface IPolicyDefault
public IDescriptor getValueDescriptor(java.lang.String name)
public void setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value) throws EPropertyException
setValue
in interface IPolicyDefault
name
- name of propertylocale
- locale of the end userrequest
- requestvalue
- value to be set in the given requestEPropertyException
- failed to set propertypublic java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request) throws EPropertyException
getValue
in interface IPolicyDefault
name
- name of propertylocale
- locale of the end userrequest
- requestEPropertyException
- failed to get propertypublic java.lang.String toHexString(byte[] data)
protected void refreshConfigAndValueNames()
protected void deleteExtension(java.lang.String name, netscape.security.x509.X509CertInfo info)
protected netscape.security.x509.Extension getExtension(java.lang.String name, netscape.security.x509.X509CertInfo info)
protected netscape.security.x509.Extension getExtension(java.lang.String name, netscape.security.x509.CertificateExtensions exts)
protected void addExtension(java.lang.String name, netscape.security.x509.Extension ext, netscape.security.x509.X509CertInfo info) throws EProfileException
EProfileException
protected void replaceExtension(java.lang.String name, netscape.security.x509.Extension ext, netscape.security.x509.X509CertInfo info) throws EProfileException
EProfileException
protected boolean isOptional(java.lang.String value)
protected boolean getBoolean(java.lang.String value)
protected int getInt(java.lang.String value)
protected boolean getConfigBoolean(java.lang.String value)
protected int getConfigInt(java.lang.String value)
protected boolean isGeneralNameValid(java.lang.String name)
protected netscape.security.x509.GeneralNameInterface parseGeneralName(java.lang.String name) throws java.io.IOException
java.io.IOException
protected boolean isGeneralNameType(java.lang.String nameType)
protected netscape.security.x509.GeneralNameInterface parseGeneralName(java.lang.String nameType, java.lang.String nameValue) throws java.io.IOException
java.io.IOException
public byte[] getBytes(java.lang.String string)
public boolean isValidOID(java.lang.String oid)
oid
- object identifier string.protected java.lang.String buildRecords(java.util.Vector recs) throws EPropertyException
EPropertyException
protected java.util.Vector parseRecords(java.lang.String value) throws EPropertyException
EPropertyException
protected java.lang.String getGeneralNameType(netscape.security.x509.GeneralName gn) throws EPropertyException
EPropertyException
protected java.lang.String getGeneralNameValue(netscape.security.x509.GeneralName gn) throws EPropertyException
EPropertyException
public java.util.Locale getLocale(IRequest request)
public java.lang.String toGeneralNameString(netscape.security.x509.GeneralName gn)
protected java.lang.String mapPattern(IRequest request, java.lang.String pattern) throws java.io.IOException
java.io.IOException
protected java.lang.StringBuffer escapeValueRfc1779(java.lang.String v, boolean doubleEscape)