com.netscape.certsrv.property
Class Descriptor

java.lang.Object
  extended by com.netscape.certsrv.property.Descriptor
All Implemented Interfaces:
IDescriptor

public class Descriptor
extends java.lang.Object
implements IDescriptor

This interface represents a property descriptor. A descriptor includes information that describe a property.

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

Field Summary
protected  java.lang.String mConstraint
           
protected  java.lang.String mDef
           
protected  java.lang.String mDescription
           
protected  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, HIDDEN, IMAGE_URL, INTEGER, IP, KEYGEN_REQUEST, KEYGEN_REQUEST_TYPE, PASSWORD, PRETTY_PRINT, READONLY, STRING, STRING_LIST
 
Constructor Summary
Descriptor(java.lang.String syntax, java.lang.String constraint, java.lang.String defValue, java.lang.String description)
          Constructs a descriptor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSyntax

protected java.lang.String mSyntax

mConstraint

protected java.lang.String mConstraint

mDescription

protected java.lang.String mDescription

mDef

protected java.lang.String mDef
Constructor Detail

Descriptor

public Descriptor(java.lang.String syntax,
                  java.lang.String constraint,
                  java.lang.String defValue,
                  java.lang.String description)
Constructs a descriptor.

Parameters:
syntax - syntax
constraint - constraint
defValue - default value
description - description
Method Detail

getSyntax

public java.lang.String getSyntax()
Returns the syntax of the property.

Specified by:
getSyntax in interface IDescriptor
Returns:
syntax

getDefaultValue

public java.lang.String getDefaultValue()
Returns the default value of the property.

Specified by:
getDefaultValue in interface IDescriptor
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 interface IDescriptor
Returns:
constraint

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Retrieves the description of the property.

Specified by:
getDescription in interface IDescriptor
Parameters:
locale - user locale
Returns:
description