planetj.dataengine.action
Class ObjectAction

java.lang.Object
  extended byplanetj.dataengine.action.AbstractAction
      extended byplanetj.dataengine.action.ObjectAction
All Implemented Interfaces:
java.lang.Cloneable, IHttpAction, java.io.Serializable
Direct Known Subclasses:
NamedAction, RowCollectionAction

public abstract class ObjectAction
extends AbstractAction
implements IHttpAction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class planetj.dataengine.action.AbstractAction
DEFAULT_TYPE
 
Constructor Summary
ObjectAction(IActionObject actionObject)
           
 
Method Summary
 IActionObject getActionObject()
          Gets the action object this action is to be carried out upon
 ObjectAction getCorrectAction(IActionObject ao)
          Gets the correct action object for the given parameter.
 java.lang.String getDefaultLocation()
          Get the default location where this action is to be generated
 ActionDescriptor getDescriptor()
          Get the descriptor for this action.
 java.lang.Object handleAction(java.lang.Object o, ExecutingContext ec)
          Subclasses need to provide logic to handle the action they wish to perform.
 java.lang.Object handleObjectAction(IActionObject ao, java.lang.Object o, ExecutingContext ec)
           
 boolean isApplicable(IActionObject ao, java.lang.Object o, ExecutingContext ec)
          Check to see if this action is applicable for the given action object
 boolean isApplicable(java.lang.Object o, ExecutingContext ec)
          Check to see if this action is applicable for the given action object
 void setActionObject(IActionObject actionObject)
          Sets the action object this action is to be carried out upon
 
Methods inherited from class planetj.dataengine.action.AbstractAction
clone, cloneAction, getDefaultDescriptor, getDetailsLocations, getDetailsModes, getLocation, getLocations, getName, getType, handleAction, handleAction, setDescriptor
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface planetj.dataengine.action.IHttpAction
createActionRequest, createActionRequest
 

Constructor Detail

ObjectAction

public ObjectAction(IActionObject actionObject)
Method Detail

getActionObject

public IActionObject getActionObject()
Gets the action object this action is to be carried out upon


getCorrectAction

public ObjectAction getCorrectAction(IActionObject ao)
Gets the correct action object for the given parameter. An example would be if an action was created with Row one and now we want an action similar to this, but with Row two. This allows the ObjectAction itself to handle the creation of a similar ObjectAction for the given parameter.


getDefaultLocation

public java.lang.String getDefaultLocation()
Description copied from class: AbstractAction
Get the default location where this action is to be generated

Specified by:
getDefaultLocation in class AbstractAction

getDescriptor

public ActionDescriptor getDescriptor()
Get the descriptor for this action. The descriptor is how the action is to be displayed.

Overrides:
getDescriptor in class AbstractAction

handleAction

public final java.lang.Object handleAction(java.lang.Object o,
                                           ExecutingContext ec)
                                    throws CMException
Description copied from class: AbstractAction
Subclasses need to provide logic to handle the action they wish to perform.

Specified by:
handleAction in class AbstractAction
Parameters:
o - Object to perform the action on
Throws:
CMException

handleObjectAction

public java.lang.Object handleObjectAction(IActionObject ao,
                                           java.lang.Object o,
                                           ExecutingContext ec)
                                    throws CMException
Throws:
CMException

isApplicable

public final boolean isApplicable(java.lang.Object o,
                                  ExecutingContext ec)
                           throws CMException
Check to see if this action is applicable for the given action object

Throws:
CMException

isApplicable

public boolean isApplicable(IActionObject ao,
                            java.lang.Object o,
                            ExecutingContext ec)
                     throws CMException
Check to see if this action is applicable for the given action object

Throws:
CMException

setActionObject

public final void setActionObject(IActionObject actionObject)
Sets the action object this action is to be carried out upon