|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.engine.gcv.GCValue
com.novell.nds.dirxml.engine.gcv.GCDNValue
public class GCDNValue
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:
"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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.novell.nds.dirxml.engine.gcv.GCValue |
---|
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstruction |
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_STRUCTURED, TYPE_SUBORDINATES, xmlItems |
Method Summary | |
---|---|
GCValue |
cloneValue(String name)
Clone this GCValue instance and return the cloned instance. |
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 |
---|
addXmlComment, addXmlItems, addXmlProcessingInstruction, cloneCommon, construct, construct, constructGCVRef, constructGCVRef, constructGroup, constructHeader, constructStructuredValue, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getMandatory, getName, getOwner, getParent, getType, getTypeString, getXmlItemsIterator, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, setMandatory, toXML, typeFromString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_DELIMS_LENGTH
"custom"
DN type.
public static final int DN_TYPE_LDAP
"ldap"
.
public static final int DN_TYPE_SLASH
"slash"
.
public static final int DN_TYPE_QSLASH
"qualified-slash"
.
public static final int DN_TYPE_DOT
"dot"
.
public static final int DN_TYPE_QDOT
"qualified-dot"
.
public static final int DN_TYPE_CUSTOM
"custom"
.
public static final int DN_SPACE_UNSPECIFIED
public static final int DN_SPACE_DIRXML
"dirxml"
.
public static final int DN_SPACE_APPLICATION
"application"
.
Method Detail |
---|
public GCValue cloneValue(String name)
GCValue
instance and return the cloned instance.
cloneValue
in class GCValue
the
- name for the cloned value.
public void parseValue(String value) throws GCVException
The passed value must parse according to the rules for the dn type of this instance.
parseValue
in class GCValue
value
- DN string to parse.
GCVException
- thrown if value is null
, empty, or
does not parse correctly.public String getValue()
This method will never return null
, but it may return an
empty, invalid String
if the value for this instance has
not been set.
getValue
in class GCValue
String
.public void setValue(String value) throws GCVException
The passed value must parse according to the rules for the dn type of this instance.
setValue
in class GCValue
value
- DN string to use as the value of this instance..
GCVException
- thrown if value is null
, empty, or
does not parse correctly.public int getDNType()
DN_TYPE_LDAP
, DN_TYPE_SLASH
, etc.public String getDNTypeString()
"ldap"
, "slash"
, etc.public String getDelims()
public void setDNType(int dnType) throws GCVException
The type may be one of:
DN_TYPE_LDAP
DN_TYPE_SLASH
DN_TYPE_QSLASH
DN_TYPE_DOT
DN_TYPE_QDOT
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.
dnType
- DN_TYPE_LDAP
, DN_TYPE_SLASH
, etc.
GCVException
- thrown if dnType is invalid.public void setCustomDNType(String delims) throws GCVException
The delimiter String must be of length at least MIN_DELIMS_LENGTH
(8).
delims
- The DN delimiter string for the custom type.
GCVException
- thrown if delims length is incorrect.public int getDNSpace()
DN_SPACE_UNSPECIFIED
, DN_SPACE_DIRXML
, DN_SPACE_APPLICATION
public void setDNSpace(int dnSpace) throws GCVArgumentException
dnSpace
- DN_SPACE_UNSPECIFIED
, DN_SPACE_DIRXML
, DN_SPACE_APPLICATION
GCVException
- thrown if dnSpace
value is invalid
GCVArgumentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |