|
|||||||||
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.GCListValue
public class GCListValue
Class representing "list"
type Global Configuration Values.
GCVs of type "list"
have a value that corresponds to the
items in the list.
The value is represented in different ways depending on where the GCV is referenced. In text-replacement, the list is represented in one of two ways:
Items in the list have a defined order based on the order in which the items appear in the definition.
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 String |
DEFAULT_SEPARATOR
|
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 | |
---|---|
void |
appendListItem(String item)
Append a new list item. |
GCValue |
cloneValue(String name)
Clone this GCValue instance and return the cloned instance. |
String |
getSeparator()
Return the separator string for this list. |
String |
getValue()
Return the current value of this instance. |
Node |
getXMLValue(Document document)
Return an XML node representing this GCV's value. |
void |
insertListItem(String item,
int insertionPoint)
Insert a new item into this list. |
Iterator |
iterator()
Return an Iterator for use in iterating through the
list item Strings in this instance. |
void |
parseValue(String value)
Parse the passed value based on the type and instance rules for "list" GCVs. |
boolean |
removeListItem(int index)
Remove an item from this list |
boolean |
removeListItem(String item,
boolean removeAll)
Remove an item from this list |
void |
setSeparator(String separator)
Set the separator string for this list. |
void |
setTypeHint(String hint)
Programmatically set the type-hint value. |
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, 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 String DEFAULT_SEPARATOR
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 setTypeHint(String hint)
hint
- null
, or one of GCVDtd.VAL_STRING
, GCVDtd.VAL_BOOLEAN
,
GCVDtd.VAL_INTEGER
, GCVDtd.VAL_REAL
, GCVDtd.VAL_DN
IllegalArgumentException
- thrown if hint isn't null
or one of the allowed values.public void parseValue(String value) throws GCVException
"list"
GCVs.
The passed value must be in the form <item><separator><item>, etc.
parseValue
in class GCValue
value
- Value String
to parse
GCVException
- thrown if value is not correct for this value instance.public String getValue()
This will return a string containing all of the list items, each separated by the separator string.
getValue
in class GCValue
String
.public Node getXMLValue(Document document)
Text
node containing the value
returned by getValue()
. Certain GCV types (e.g., list) may
return more structured data.
getXMLValue
in class GCValue
document
- the Document
to use to create nodes.
Node
that is the root of the XML representation.public void setValue(String value) throws GCVException
The passed value must be in the form <item><separator><item>, etc.
setValue
in class GCValue
value
- Value string for this instance.
GCVException
- thrown if value is not correct for this value instance.public String getSeparator()
String
containing separator used to separate items in
single-string representation of the list.public void setSeparator(String separator)
The separator string separates list items in the flat, single-string representation of the list.
separator
- The separator string.public void appendListItem(String item)
null
, which will result
in an empty list item.
item
- The String
value of the item.public void insertListItem(String item, int insertionPoint)
item
- The item to insert.insertionPoint
- the index at which to insert the new item.public boolean removeListItem(int index)
index
- The index of the item to remove.
true
if an item existed at the passed index and was removed.public boolean removeListItem(String item, boolean removeAll)
item
- The string value of the item to remove.removeAll
- if true
, remove all items with the passed value.
true
if one or more items was removed.public Iterator iterator()
Iterator
for use in iterating through the
list item Strings
in this instance.
Iterator
that returns String
objects.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |