planetj.dataengine.action
Class AbstractAction

java.lang.Object
  extended byplanetj.dataengine.action.AbstractAction
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
ActionWrapper, ObjectAction, ReflectAction, RowAction

public abstract class AbstractAction
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

An Action contains logic to carry out some action on an Object.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_TYPE
          Type of action subclasses are.
 
Constructor Summary
AbstractAction()
           
 
Method Summary
 java.lang.Object clone()
           
 AbstractAction cloneAction()
           
 ActionDescriptor getDefaultDescriptor()
          Get the default action descriptor for this action.
abstract  java.lang.String getDefaultLocation()
          Get the default location where this action is to be generated
 ActionDescriptor getDescriptor()
          Get the descriptor for this action.
 java.util.List getDetailsLocations()
          Gets the locations where this action should be generated on the details page
 java.util.List getDetailsModes()
          Gets the modes for which this action can be displayed in the details screen.
 java.lang.String getLocation()
          Deprecated. Replaced with getLocations(), since there could be more than one
 java.util.List getLocations()
          Get the locations where this action is to be generated (on the results screen).
abstract  java.lang.String getName()
          Subclasses may override if necessary.
 java.lang.String getType()
          Subclasses may override if necessary.
 java.lang.Object handleAction(ExecutingContext ec)
          Subclasses need to provide logic to handle the action they wish to perform.
 java.lang.Object handleAction(java.lang.Object o)
          Subclasses need to provide logic to handle the action they wish to perform.
abstract  java.lang.Object handleAction(java.lang.Object o, ExecutingContext ec)
          Subclasses need to provide logic to handle the action they wish to perform.
 void setDescriptor(ActionDescriptor descriptor)
          Set the descriptor for this action.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TYPE

public static final java.lang.String DEFAULT_TYPE
Type of action subclasses are.

See Also:
Constant Field Values
Constructor Detail

AbstractAction

public AbstractAction()
Method Detail

getDescriptor

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


getDetailsLocations

public java.util.List getDetailsLocations()
Gets the locations where this action should be generated on the details page


getDetailsModes

public java.util.List getDetailsModes()
Gets the modes for which this action can be displayed in the details screen. This values will never be null


clone

public java.lang.Object clone()

cloneAction

public AbstractAction cloneAction()

getDefaultDescriptor

public ActionDescriptor getDefaultDescriptor()
Get the default action descriptor for this action. Subclasses may optionally provide a default descriptor


getDefaultLocation

public abstract java.lang.String getDefaultLocation()
Get the default location where this action is to be generated


getLocation

public java.lang.String getLocation()
Deprecated. Replaced with getLocations(), since there could be more than one

Get the location where this action is to be generated


getLocations

public java.util.List getLocations()
Get the locations where this action is to be generated (on the results screen). (Locations are always uppercase.)


getName

public abstract java.lang.String getName()
Subclasses may override if necessary. Doing so will allow subclasses to have their own distinct action name


getType

public java.lang.String getType()
Subclasses may override if necessary. Doing so will allow subclasses to have their own distinct property group descriptors.


handleAction

public final java.lang.Object handleAction(ExecutingContext ec)
                                    throws CMException
Subclasses need to provide logic to handle the action they wish to perform.

Parameters:
ec - context in which code is running
Throws:
CMException

handleAction

public final java.lang.Object handleAction(java.lang.Object o)
                                    throws CMException
Subclasses need to provide logic to handle the action they wish to perform.

Parameters:
o - Object to perform the action on
Throws:
CMException

handleAction

public abstract java.lang.Object handleAction(java.lang.Object o,
                                              ExecutingContext ec)
                                       throws CMException
Subclasses need to provide logic to handle the action they wish to perform.

Parameters:
o - Object to perform the action on
Throws:
CMException

setDescriptor

public void setDescriptor(ActionDescriptor descriptor)
Set the descriptor for this action. The descriptor is how the action is to be displayed.