com.esri.adf.web.ags.data.edit
Class EditAction

java.lang.Object
  extended by com.esri.adf.web.ags.data.edit.EditAction
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AddFeature, AddVertex, CopyFeature, MergeFeatures, MoveFeature, MoveVertex, RemoveFeature, RemoveVertex, SelectByExtent, SplitLineFeature, SplitPolygonFeature, UpdateAttribute

public abstract class EditAction
extends Object
implements Serializable

Defines an editing action. All editing actions should implement this interface. EditWorkspace can process the actions by the perform method. A edit action can be either session aware or not session aware. All actions changing features or attributes should be session aware action.

See Also:
Serialized Form

Field Summary
protected  CopyOnWriteArrayList<ActionEventListener> eventListeners
          The event listeners registered under the action.
 
Constructor Summary
protected EditAction(boolean sessionAware)
          Instantiates an object of EditAction.
 
Method Summary
abstract  void action(ActionContext context)
          Performs the action.
 void addEventListener(ActionEventListener listener)
          Adds an event listener
protected  void fireEvent(EditEvent event)
          Fires an event to all the listeners.
 boolean isEnabled()
          Returns true if the action is enabled.
 boolean isSessionAware()
          Returns true if the action need to be performed within an editing workspace session.
 void removeEventListener(ActionEventListener listener)
          Removes the event listener.
 void setEnabled(boolean enabled)
          Sets to true to enable the action.
 void setSessionAware(boolean sessionAware)
          Sets to true if the action need to be performed within an editing workspace session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventListeners

protected CopyOnWriteArrayList<ActionEventListener> eventListeners
The event listeners registered under the action.

Constructor Detail

EditAction

protected EditAction(boolean sessionAware)
Instantiates an object of EditAction.

Parameters:
sessionAware - set to true if the action need to be performed within a editing workspace session.
Method Detail

isSessionAware

public boolean isSessionAware()
Returns true if the action need to be performed within an editing workspace session.

Returns:
true if the action need to be performed within an editing workspace session.

setSessionAware

public void setSessionAware(boolean sessionAware)
Sets to true if the action need to be performed within an editing workspace session.

Parameters:
sessionAware - Sets to true if the action need to be performed within an editing workspace.

isEnabled

public boolean isEnabled()
Returns true if the action is enabled.

Returns:
Returns the enabled.

setEnabled

public void setEnabled(boolean enabled)
Sets to true to enable the action.

Parameters:
enabled - The enabled to set.

addEventListener

public void addEventListener(ActionEventListener listener)
Adds an event listener

Parameters:
listener -

removeEventListener

public void removeEventListener(ActionEventListener listener)
Removes the event listener.

Parameters:
listener -

fireEvent

protected void fireEvent(EditEvent event)
Fires an event to all the listeners.

Parameters:
event -

action

public abstract void action(ActionContext context)
                     throws Exception
Performs the action.

Parameters:
context - the action context.
Throws:
Exception