com.novell.nds.dirxml.engine.gcv
Class GCStringValue

java.lang.Object
  extended by com.novell.nds.dirxml.engine.gcv.GCValue
      extended by com.novell.nds.dirxml.engine.gcv.GCStringValue
All Implemented Interfaces:
ConfigElement

public class GCStringValue
extends GCValue

Class representing "string" type Global Configuration Values.

Lexical value representations of "string" GCVs must match the following production:

String ::= Char*

The default value of a newly-constructed GCStringValue object is the empty string "".


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
 
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
 
Constructor Summary
GCStringValue(String name)
          Constructor for use by GCValue construct() method.
 
Method Summary
 GCValue cloneValue(String name)
          Clone this GCValue instance and return the cloned instance.
 boolean getMultiline()
          Return true if this value is a multi-lined valued.
 String getValue()
          Return the current value of this instance.
 void parseValue(String value)
          Parse the passed value based on the type lexical rules for "string" GCVs.
 void setMultiline(boolean multiline)
          Set whether or not this value is multi-lined.
 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
 

Constructor Detail

GCStringValue

public GCStringValue(String name)
              throws GCVArgumentException
Constructor for use by GCValue construct() method.

Parameters:
name - Name of string GCV.
Throws:
GCVArgumentException - thrown if name is invalid
Method Detail

cloneValue

public GCValue cloneValue(String name)
Clone this GCValue instance and return the cloned instance.

Specified by:
cloneValue in class GCValue
Parameters:
the - name for the cloned value.
Returns:
the cloned instance

parseValue

public void parseValue(String value)
                throws GCVException
Parse the passed value based on the type lexical rules for "string" GCVs.

The passed value must match the production described in the description of this class.

Specified by:
parseValue in class GCValue
Parameters:
value - Value String to parse
Throws:
GCVException - thrown if value does not match "string" constraints.

getValue

public String getValue()
Return the current value of this instance.

Specified by:
getValue in class GCValue
Returns:
String containing current value of this instance.

setValue

public void setValue(String value)
              throws GCVException
Set the value for this instance.

The passed value must conform to the rules noted under parseValue().

Specified by:
setValue in class GCValue
Parameters:
value - Value String for this instance.
Throws:
GCVException - thrown if value is doesn't not parse correctly.
See Also:
parseValue(java.lang.String)

getMultiline

public boolean getMultiline()
Return true if this value is a multi-lined valued.

This doesn't indicate whether the value itself has multiple lines, only that it should be presented in a multi-line editing control and that the user should be able to specify line breaks.

Returns:
true if multi-lined

setMultiline

public void setMultiline(boolean multiline)
Set whether or not this value is multi-lined.

This doesn't indicate whether the value itself has multiple lines, only that it should be presented in a multi-line editing control and that the user should be able to specify line breaks.

Parameters:
multiline - true if value is multi-lined.