com.novell.nds.dirxml.shimhost
Class OldStyleParams.Param

java.lang.Object
  extended bycom.novell.nds.dirxml.shimhost.OldStyleParams.Param
Direct Known Subclasses:
OldStyleParams.PasswordParam
Enclosing class:
OldStyleParams

public static class OldStyleParams.Param
extends Object

Encapsulation of a single shim parameter.


Constructor Summary
OldStyleParams.Param(String name)
          Create a Param instance.
 
Method Summary
 String getDisplayName()
          Return the display name of this Param
 String getName()
          Get the name of this Param
 String getValue()
          Get the value of this Param
 boolean hasBeenModified()
          Return true if this instance has been modified.
 void resetModified()
          Reset the modified flag for this instance such that hasBeenModified() will return false.
 void setDisplayName(String newName)
          Set the display name for this Param
 void setName(String newName)
          Set the name of this Param
 void setValue(String newValue)
          Set the value of this Param
 Element toXML(Node parent)
          Construct an XML representation of this Param

Note that the act of creating an XML representation does not reset this instance's modified flag.

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

Constructor Detail

OldStyleParams.Param

public OldStyleParams.Param(String name)
                     throws IllegalArgumentException
Create a Param instance.

Parameters:
name - name of the parameter (and name of XML element)
Throws:
IllegalArgumentException - if name does not match the XML Name production
Method Detail

hasBeenModified

public boolean hasBeenModified()
Return true if this instance has been modified.

The instance is considered to have been modified if a change was made that affects the persistent representation since:

  1. The instance was constructed from an XML representation.
  2. resetModified() was last called

Returns:
true or false
See Also:
resetModified(), toXML(org.w3c.dom.Node)

resetModified

public void resetModified()
Reset the modified flag for this instance such that hasBeenModified() will return false.

See Also:
hasBeenModified()

toXML

public Element toXML(Node parent)
Construct an XML representation of this Param

Note that the act of creating an XML representation does not reset this instance's modified flag. It must be reset by calling resetModified().

Parameters:
parent - Node under which to build representation
Returns:
constructed Element
See Also:
hasBeenModified(), resetModified()

getName

public String getName()
Get the name of this Param

Returns:
name

setName

public void setName(String newName)
             throws IllegalArgumentException
Set the name of this Param

Parameters:
newName - name
Throws:
IllegalArgumentException - if newName doesn't match the XML Name production

getDisplayName

public String getDisplayName()
Return the display name of this Param

Returns:
display name (may be null)

setDisplayName

public void setDisplayName(String newName)
Set the display name for this Param

Parameters:
newName - display name

getValue

public String getValue()
Get the value of this Param

Returns:
value

setValue

public void setValue(String newValue)
Set the value of this Param

Parameters:
newValue - value