Class Descriptor

java.lang.Object
com.netscape.certsrv.property.Descriptor
All Implemented Interfaces:
IDescriptor, JSONSerializer

public class Descriptor extends Object implements IDescriptor, JSONSerializer
This interface represents a property descriptor. A descriptor includes information that describe a property.
Version:
$Revision$, $Date$
  • Field Details

    • mSyntax

      public String mSyntax
    • mConstraint

      public String mConstraint
    • mDescription

      public String mDescription
    • mDef

      public String mDef
  • Constructor Details

    • Descriptor

      public Descriptor()
    • Descriptor

      public Descriptor(String syntax, String constraint, String defValue, String description)
      Constructs a descriptor.
      Parameters:
      syntax - syntax
      constraint - constraint
      defValue - default value
      description - description
  • Method Details

    • getSyntax

      public String getSyntax()
      Returns the syntax of the property.
      Specified by:
      getSyntax in interface IDescriptor
      Returns:
      syntax
    • getDefaultValue

      public String getDefaultValue()
      Returns the default value of the property.
      Specified by:
      getDefaultValue in interface IDescriptor
      Returns:
      default value
    • getConstraint

      public 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 interface IDescriptor
      Returns:
      constraint
    • getDescription

      public String getDescription(Locale locale)
      Retrieves the description of the property.
      Specified by:
      getDescription in interface IDescriptor
      Parameters:
      locale - user locale
      Returns:
      description
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toDOM

      public void toDOM(Document document, Element element)
    • toDOM

      public Element toDOM(Document document)
    • fromDOM

      public static Descriptor fromDOM(Element element)