Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.engine.gcv
Class GCDNValue

    java.lang.Object
      com.novell.nds.dirxml.engine.gcv.GCValue
          com.novell.nds.dirxml.engine.gcv.GCDNValue

All Implemented Interfaces:
  ConfigElement

    public class GCDNValue

extends GCValue

Class representing "dn" type Global Configuration Values.

DN values contain non-`null`, non-empty strings that parse correctly according to one of the following DN types:

- ldap
- slash
- qualified slash
- dot
- qualified dot
- custom

A DN value with type `"custom"` must also supply the delimiter set for parsing the DN value.

The DN type of a `GCDNValue` instance defaults to `"slash"`.

The default value of a newly-constructed `GCDNValue` object is `""`. Note that this is an invalid value. The newly-constructed value is not valid until a lexically-valid value has been set.

The default dn type of a newly-constructed `GCDNValue` object is `"slash"`.

A "dn space" may be set. This indicates to the user agent presenting the value that the DN represents an object either in the DirXML space (eDirectory) or in the application space. If the dn space isn't set no assumptions can be made.

Field Summary
`static int` | `DN_SPACE_APPLICATION` Integer constant representing DN space `"application"`.
`static int` | `DN_SPACE_DIRXML` Integer constant representing DN space `"dirxml"`.
`static int` | `DN_SPACE_UNSPECIFIED` Integer constant indicating DN space isn't specified.
`static int` | `DN_TYPE_CUSTOM` Integer constant representing DN type `"custom"`.
`static int` | `DN_TYPE_DOT` Integer constant representing DN type `"dot"`.
`static int` | `DN_TYPE_LDAP` Integer constant representing DN type `"ldap"`.
`static int` | `DN_TYPE_QDOT` Integer constant representing DN type `"qualified-dot"`.
`static int` | `DN_TYPE_QSLASH` Integer constant representing DN type `"qualified-slash"`.
`static int` | `DN_TYPE_SLASH` Integer constant representing DN type `"slash"`.
`static int` | `MIN_DELIMS_LENGTH` Length of delimiter string for `"custom"` DN type.

Fields inherited from class com.novell.nds.dirxml.engine.gcv.GCValue
`modified, parent, TYPE_BOOLEAN, TYPE_DN, TYPE_DN_REF, TYPE_ENUM, TYPE_GCV_REF, TYPE_GROUP, TYPE_HEADER, TYPE_INTEGER, TYPE_LIST, TYPE_PASSWORD_REF, TYPE_REAL, TYPE_STRING, TYPE_SUBORDINATES`

Method Summary
`String` | `getDelims()` Return the delimiters for this DN type.
`int` | `getDNSpace()` Get the integer value corresponding to the DN space for this value.
`int` | `getDNType()` Return integer value corresponding to DN type.
`String` | `getDNTypeString()` Return the string representing the DN type.
`String` | `getValue()` Return the value of this DN GCV.
`void` | `parseValue(String value)` Parse the passed value based on the type and instance rules for "dn" GCVs.
`void` | `setCustomDNType(String delims)` Set the DN type of this instance to "custom" and set the delimiter set for DN parsing.
`void` | `setDNSpace(int dnSpace)` Set the DN space for this value.
`void` | `setDNType(int dnType)` Set the DN type for this instance.
`void` | `setValue(String value)` Set the value for this instance.

Methods inherited from class com.novell.nds.dirxml.engine.gcv.GCValue
`construct, construct, constructGCVRef, constructGroup, constructHeader, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getName, getType, getTypeString, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, toXML, typeFromString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MIN_DELIMS_LENGTH

    public static final int MIN_DELIMS_LENGTH

  Length of delimiter string for `"custom"` DN type.

  See Also:
    Constant Field Values

### DN_TYPE_LDAP

    public static final int DN_TYPE_LDAP

  Integer constant representing DN type `"ldap"`.

  See Also:
    Constant Field Values

### DN_TYPE_SLASH

    public static final int DN_TYPE_SLASH

  Integer constant representing DN type `"slash"`.

  See Also:
    Constant Field Values

### DN_TYPE_QSLASH

    public static final int DN_TYPE_QSLASH

  Integer constant representing DN type `"qualified-slash"`.

  See Also:
    Constant Field Values

### DN_TYPE_DOT

    public static final int DN_TYPE_DOT

  Integer constant representing DN type `"dot"`.

  See Also:
    Constant Field Values

### DN_TYPE_QDOT

    public static final int DN_TYPE_QDOT

  Integer constant representing DN type `"qualified-dot"`.

  See Also:
    Constant Field Values

### DN_TYPE_CUSTOM

    public static final int DN_TYPE_CUSTOM

  Integer constant representing DN type `"custom"`.

  See Also:
    Constant Field Values

### DN_SPACE_UNSPECIFIED

    public static final int DN_SPACE_UNSPECIFIED

  Integer constant indicating DN space isn't specified.

  See Also:
    Constant Field Values

### DN_SPACE_DIRXML

    public static final int DN_SPACE_DIRXML

  Integer constant representing DN space `"dirxml"`.

  See Also:
    Constant Field Values

### DN_SPACE_APPLICATION

    public static final int DN_SPACE_APPLICATION

  Integer constant representing DN space `"application"`.

  See Also:
    Constant Field Values

Method Detail

### parseValue

    public void parseValue(String value)
                    throws GCVException

  Parse the passed value based on the type and instance rules for "dn" GCVs.

  The passed value must parse according to the rules for the dn type of this instance.

  Specified by:
    `parseValue` in class `GCValue`
  Parameters:
    `value` - DN string to parse.
  Throws:
    `GCVException` - thrown if value is `null`, empty, or does not parse correctly.

### getValue

    public String getValue()

  Return the value of this DN GCV.

  This method will never return `null`, but it may return an empty, invalid `String` if the value for this instance has not been set.

  Specified by:
    `getValue` in class `GCValue`
  Returns:
    value `String`.

### setValue

    public void setValue(String value)
                  throws GCVException

  Set the value for this instance.

  The passed value must parse according to the rules for the dn type of this instance.

  Specified by:
    `setValue` in class `GCValue`
  Parameters:
    `value` - DN string to use as the value of this instance..
  Throws:
    `GCVException` - thrown if value is `null`, empty, or does not parse correctly.

### getDNType

    public int getDNType()

  Return integer value corresponding to DN type.

  Returns:
    `DN_TYPE_LDAP`, `DN_TYPE_SLASH`, etc.

### getDNTypeString

    public String getDNTypeString()

  Return the string representing the DN type.

  Returns:
    `"ldap"`, `"slash"`, etc.

### getDelims

    public String getDelims()

  Return the delimiters for this DN type.

  Returns:
    DN delimiter string.

### setDNType

    public void setDNType(int dnType)
                   throws GCVException

  Set the DN type for this instance.

  The type may be one of:

  - `DN_TYPE_LDAP`
  - `DN_TYPE_SLASH`
  - `DN_TYPE_QSLASH`
  - `DN_TYPE_DOT`
  - `DN_TYPE_QDOT`
  Note that the type may not be `DN_TYPE_CUSTOM`. Use `setCustomDNType()` to set a custom DN type.

  The existing DN value will be set to the empty string if it does not parse correctly under the new DN type rules.

  Parameters:
    `dnType` - `DN_TYPE_LDAP`, `DN_TYPE_SLASH`, etc.
  Throws:
    `GCVException` - thrown if dnType is invalid.

### setCustomDNType

    public void setCustomDNType(String delims)
                         throws GCVException

  Set the DN type of this instance to "custom" and set the delimiter set for DN parsing.

  The delimiter String must be of length at least `MIN_DELIMS_LENGTH` (8).

  Parameters:
    `delims` - The DN delimiter string for the custom type.
  Throws:
    `GCVException` - thrown if delims length is incorrect.

### getDNSpace

    public int getDNSpace()

  Get the integer value corresponding to the DN space for this value.

  Returns:
    `DN_SPACE_UNSPECIFIED`, `DN_SPACE_DIRXML`, `DN_SPACE_APPLICATION`

### setDNSpace

    public void setDNSpace(int dnSpace)
                    throws GCVArgumentException

  Set the DN space for this value.

  Parameters:
    `dnSpace` - `DN_SPACE_UNSPECIFIED`, `DN_SPACE_DIRXML`, `DN_SPACE_APPLICATION`
  Throws:
    `GCVException` - thrown if `dnSpace` value is invalid
    `GCVArgumentException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD