com.waveset.object
Class Modification

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.Modification
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject

public class Modification
extends AbstractXmlObject

A class used to describe a modification to a view attribute.


Field Summary
static java.lang.String ADD
          Modification type code indiciating that the value(s) should should be added to the current value.
static java.lang.String code_id
           
static java.lang.String DELETE
          Modification type code indiciating that the value(s) should should be removed from the current value.
static java.lang.String ELEMENT
           
static java.lang.String REPLACE
          Modification type code indicating that the value should be completely replaced.
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
Modification()
          Construct a new empty configuration object.
Modification(org.w3c.dom.Element e)
           
Modification(java.lang.String type, java.lang.Object value)
           
 
Method Summary
 java.lang.String getElementName()
          Return the element name.
 java.lang.String getType()
           
 java.lang.Object getValue()
           
 boolean isAdd()
           
 boolean isDelete()
           
 boolean isReplace()
           
 void parseXml(org.w3c.dom.Element e)
           
 java.lang.Object process(java.lang.Object current)
          Perform the modification of a value.
 void setType(java.lang.String s)
           
 void setValue(java.lang.Object o)
           
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

REPLACE

public static final java.lang.String REPLACE
Modification type code indicating that the value should be completely replaced.

See Also:
Constant Field Values

ADD

public static final java.lang.String ADD
Modification type code indiciating that the value(s) should should be added to the current value. The current value is promoted to a List if it is not already a list.

See Also:
Constant Field Values

DELETE

public static final java.lang.String DELETE
Modification type code indiciating that the value(s) should should be removed from the current value. If the resulting value will become null if all of the elements are removed.

See Also:
Constant Field Values

ELEMENT

public static final java.lang.String ELEMENT
See Also:
Constant Field Values
Constructor Detail

Modification

public Modification()
Construct a new empty configuration object.


Modification

public Modification(java.lang.String type,
                    java.lang.Object value)

Modification

public Modification(org.w3c.dom.Element e)
             throws WavesetException
Method Detail

setType

public void setType(java.lang.String s)

setValue

public void setValue(java.lang.Object o)

getElementName

public java.lang.String getElementName()
Description copied from class: AbstractXmlObject
Return the element name.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject

getType

public java.lang.String getType()

getValue

public java.lang.Object getValue()

isAdd

public boolean isAdd()

isDelete

public boolean isDelete()

isReplace

public boolean isReplace()

process

public java.lang.Object process(java.lang.Object current)
Perform the modification of a value.


toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Description copied from class: AbstractXmlObject
Serialize into a buffer with optional indentation. This must be implemented by the subclass.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject

parseXml

public void parseXml(org.w3c.dom.Element e)
              throws WavesetException
Throws:
WavesetException