Package com.netscape.certsrv.property
Class Descriptor
- java.lang.Object
-
- com.netscape.certsrv.property.Descriptor
-
- All Implemented Interfaces:
IDescriptor
,JSONSerializer
public class Descriptor extends java.lang.Object implements IDescriptor, JSONSerializer
This interface represents a property descriptor. A descriptor includes information that describe a property.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
mConstraint
java.lang.String
mDef
java.lang.String
mDescription
java.lang.String
mSyntax
-
Fields inherited from interface com.netscape.certsrv.property.IDescriptor
BOOLEAN, CERT_REQUEST, CERT_REQUEST_TYPE, CHOICE, DATE, DN, DUAL_KEYGEN_REQUEST, DUAL_KEYGEN_REQUEST_TYPE, EMAIL, ENC_KEYGEN_REQUEST, ENC_KEYGEN_REQUEST_TYPE, HIDDEN, IMAGE_URL, INTEGER, IP, KEYGEN_REQUEST, KEYGEN_REQUEST_TYPE, PASSWORD, PRETTY_PRINT, READONLY, SERVER_SIDE_KEYGEN_KEY_SIZE, SERVER_SIDE_KEYGEN_KEY_TYPE, SERVER_SIDE_KEYGEN_PKCS12, SERVER_SIDE_KEYGEN_REQUEST_TYPE, SIGN_KEYGEN_REQUEST, SIGN_KEYGEN_REQUEST_TYPE, STRING, STRING_LIST
-
Fields inherited from interface com.netscape.certsrv.util.JSONSerializer
logger
-
-
Constructor Summary
Constructors Constructor Description Descriptor()
Descriptor(java.lang.String syntax, java.lang.String constraint, java.lang.String defValue, java.lang.String description)
Constructs a descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static Descriptor
fromDOM(org.w3c.dom.Element element)
java.lang.String
getConstraint()
Constraint for the given syntax.java.lang.String
getDefaultValue()
Returns the default value of the property.java.lang.String
getDescription(java.util.Locale locale)
Retrieves the description of the property.java.lang.String
getSyntax()
Returns the syntax of the property.int
hashCode()
org.w3c.dom.Element
toDOM(org.w3c.dom.Document document)
void
toDOM(org.w3c.dom.Document document, org.w3c.dom.Element element)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.netscape.certsrv.util.JSONSerializer
toJSON
-
-
-
-
Constructor Detail
-
Descriptor
public Descriptor()
-
Descriptor
public Descriptor(java.lang.String syntax, java.lang.String constraint, java.lang.String defValue, java.lang.String description)
Constructs a descriptor.- Parameters:
syntax
- syntaxconstraint
- constraintdefValue
- default valuedescription
- description
-
-
Method Detail
-
getSyntax
public java.lang.String getSyntax()
Returns the syntax of the property.- Specified by:
getSyntax
in interfaceIDescriptor
- Returns:
- syntax
-
getDefaultValue
public java.lang.String getDefaultValue()
Returns the default value of the property.- Specified by:
getDefaultValue
in interfaceIDescriptor
- Returns:
- default value
-
getConstraint
public java.lang.String getConstraint()
Constraint for the given syntax. For example,- number(1-5): 1-5 is the constraint, and it indicates that the number must be in the range of 1 to 5.
- choice(cert,crl): cert,crl is the constraint for choice
If null, no constraint shall be enforced.
- Specified by:
getConstraint
in interfaceIDescriptor
- Returns:
- constraint
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
Retrieves the description of the property.- Specified by:
getDescription
in interfaceIDescriptor
- Parameters:
locale
- user locale- Returns:
- description
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toDOM
public void toDOM(org.w3c.dom.Document document, org.w3c.dom.Element element)
-
toDOM
public org.w3c.dom.Element toDOM(org.w3c.dom.Document document)
-
fromDOM
public static Descriptor fromDOM(org.w3c.dom.Element element)
-
-