com.metamatrix.common.actions
Class ExchangeNamedObject

java.lang.Object
  extended by com.metamatrix.common.actions.ActionDefinition
      extended by com.metamatrix.common.actions.TargetedActionDefinition
          extended by com.metamatrix.common.actions.ExchangeObject
              extended by com.metamatrix.common.actions.ExchangeNamedObject
All Implemented Interfaces:
NamedObjectActionDefinition, java.io.Serializable, java.lang.Cloneable

public class ExchangeNamedObject
extends ExchangeObject
implements NamedObjectActionDefinition

This action definition specifies that the value of a named object reference in the target should be changed from the current object to a new object.

See Also:
Serialized Form

Constructor Summary
protected ExchangeNamedObject(ExchangeNamedObject rhs)
           
  ExchangeNamedObject(java.lang.Object target, AttributeDefinition attribute, java.lang.Object[] args)
           
  ExchangeNamedObject(java.lang.Object target, AttributeDefinition attribute, java.lang.String name, java.lang.Object previousValue, java.lang.Object newValue)
           
protected ExchangeNamedObject(java.lang.Object target, java.lang.Integer attributeCode, java.lang.Object[] args)
           
 
Method Summary
 java.lang.Object clone()
          Return a deep cloned instance of this object.
 java.lang.String getActionDescription()
          Get the description (i.e., verb) for this type of action.
 java.lang.String getName()
           
 java.lang.Object getNewValue()
           
 java.lang.Object getPreviousValue()
           
 ActionDefinition getUndoActionDefinition()
          Obtain the definition of the action that undoes this action definition.
 void setName(java.lang.String newName)
           
 java.lang.String toString()
          Returns a string representing the current state of the object.
 
Methods inherited from class com.metamatrix.common.actions.ActionDefinition
getArguments, getAttributeCode, getAttributeDescription, getCreationTime, getCreationTimeMillis, getTarget, hasArguments, hasAttributeCode, hasTarget
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExchangeNamedObject

public ExchangeNamedObject(java.lang.Object target,
                           AttributeDefinition attribute,
                           java.lang.String name,
                           java.lang.Object previousValue,
                           java.lang.Object newValue)

ExchangeNamedObject

public ExchangeNamedObject(java.lang.Object target,
                           AttributeDefinition attribute,
                           java.lang.Object[] args)

ExchangeNamedObject

protected ExchangeNamedObject(java.lang.Object target,
                              java.lang.Integer attributeCode,
                              java.lang.Object[] args)

ExchangeNamedObject

protected ExchangeNamedObject(ExchangeNamedObject rhs)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface NamedObjectActionDefinition

getPreviousValue

public java.lang.Object getPreviousValue()
Overrides:
getPreviousValue in class ExchangeObject

getNewValue

public java.lang.Object getNewValue()
Overrides:
getNewValue in class ExchangeObject

setName

public void setName(java.lang.String newName)
Specified by:
setName in interface NamedObjectActionDefinition

getActionDescription

public java.lang.String getActionDescription()
Description copied from class: ActionDefinition
Get the description (i.e., verb) for this type of action.

Overrides:
getActionDescription in class ExchangeObject
Returns:
the string description for this type of action.

toString

public java.lang.String toString()
Returns a string representing the current state of the object.

Overrides:
toString in class ExchangeObject
Returns:
the string representation of this instance.

clone

public java.lang.Object clone()
Return a deep cloned instance of this object. Subclasses must override this method.

Overrides:
clone in class ExchangeObject
Returns:
the object that is the clone of this instance.

getUndoActionDefinition

public ActionDefinition getUndoActionDefinition()
Obtain the definition of the action that undoes this action definition. If a modification action with the returned action definition is applied to the same target (when the state is such as that left by the original modification action), the resulting target will be left in a state that is identical to the target before either action were applied.

Overrides:
getUndoActionDefinition in class ExchangeObject
Returns:
the action definition that undoes this action definition.


Copyright © 2009. All Rights Reserved.