com.jbbres.lib.actions.tools.elements
Class AbstractAction

java.lang.Object
  extended by com.jbbres.lib.actions.tools.elements.AbstractElement
      extended by com.jbbres.lib.actions.tools.elements.AbstractAction
All Implemented Interfaces:
Action, Element

public abstract class AbstractAction
extends AbstractElement
implements Action

This abstract class provides default implementations for most of the methods in the Action interface.

To create a concrete Action as a subclass of AbstractAction you need only to provide a constructor accepting a Workflow object, for example:

public MyAction(final Workflow workflow) throws IOException {
super(workflow);
}

The action also requires to be associated to an AbstractActionService and, if required, to an AbstractActionUI. The associated classes are declared within the action properties file (see DefaultActionDescription for more information about the action properties file}.

For more information on how to create your own actions, consult the Action(s) Developer Guide or visit http://app.jbbres.com/actions/developers/.

Since:
1.0.0
Version:
1.0.0
Author:
Jean-Baptiste Bres

Constructor Summary
AbstractAction(Workflow workflow)
          Instantiates a new action.
 
Method Summary
 ActionDescription getDescription()
          Returns the description of the element.
 Parameters getParameters()
          Returns the state of the element.
 AbstractActionService<?,?> getService()
          Returns the service associated to the element.
 AbstractActionUI getUI()
          returns the User Interface displayed in the workflow definition panel in Action(s), and that user can use to define the settings of the action.
 void setParameters(Parameters parameters)
          Sets the current state of the element.
 
Methods inherited from class com.jbbres.lib.actions.tools.elements.AbstractElement
getWorkflow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAction

public AbstractAction(Workflow workflow)
               throws java.io.IOException
Instantiates a new action.

Parameters:
workflow - - the workflow
Throws:
java.io.IOException - Signals that an I/O exception has occurred.
Method Detail

getService

public AbstractActionService<?,?> getService()
Description copied from interface: Element
Returns the service associated to the element. The service describes how the element performs within the workflow. For example, if the element is an action, the service will contain the executable methods that the action is designed to perform. If the element is a variable, the service will contain methods related to data access.

Specified by:
getService in interface Action
Specified by:
getService in interface Element
Overrides:
getService in class AbstractElement
Returns:
the service associated to the element.
See Also:
ElementService

getUI

public AbstractActionUI getUI()
Description copied from interface: Action
returns the User Interface displayed in the workflow definition panel in Action(s), and that user can use to define the settings of the action.

Specified by:
getUI in interface Action
Returns:
the User Interface displayed in the workflow definition panel

getDescription

public ActionDescription getDescription()
Description copied from interface: Element
Returns the description of the element. The description is a dictionary derived from the element description, usually the information specified in the element information property list.

Specified by:
getDescription in interface Action
Specified by:
getDescription in interface Element
Overrides:
getDescription in class AbstractElement
Returns:
the description of the element.
See Also:
ElementDescription

getParameters

public Parameters getParameters()
Description copied from interface: Element
Returns the state of the element.

Specified by:
getParameters in interface Element
Returns:
the current state of the element.
See Also:
Element.setParameters(Parameters), Parameters

setParameters

public void setParameters(Parameters parameters)
                   throws InvalidParametersException
Description copied from interface: Element
Sets the current state of the element.

Specified by:
setParameters in interface Element
Parameters:
parameters - - the parameters. Can be null
Throws:
InvalidParametersException - Occurs when the parameters received are incorrect and cannot be mapped in the element.
See Also:
Element.getParameters(), Parameters


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.