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

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

public class AbstractVariable
extends AbstractElement
implements Variable

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

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

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

The action also requires to be associated to an AbstractVariableService. The associated class is declared within the variable properties file (see DefaultVariableDescription for more information about the variable properties file}.

However, it is recommended to create your own variables as subclasses of RuntimeVariable or StorageVariable.

For more information on how to create your own variables, 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
AbstractVariable(Workflow workflow)
          Instantiates a new variable.
 
Method Summary
 VariableDescription getDescription()
          Returns the description of the element.
 javax.swing.table.TableCellEditor getEditor()
          Returns the TableCellEditor used to edit the variable value.
 Parameters getParameters()
          Returns the state of the element.
 javax.swing.table.TableCellRenderer getRenderer()
          Returns the TableCellRenderer used to render the variable value.
 AbstractVariableService<?> getService()
          Returns the service associated to the element.
 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

AbstractVariable

public AbstractVariable(Workflow workflow)
                 throws java.io.IOException
Instantiates a new variable.

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

getService

public AbstractVariableService<?> 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 Element
Specified by:
getService in interface Variable
Overrides:
getService in class AbstractElement
Returns:
the service associated to the element.
See Also:
ElementService

getDescription

public VariableDescription 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 Element
Specified by:
getDescription in interface Variable
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

getEditor

public javax.swing.table.TableCellEditor getEditor()
Description copied from interface: Variable
Returns the TableCellEditor used to edit the variable value.

This method is not used in Action(s) 1.0.

Specified by:
getEditor in interface Variable
Returns:
the editor

getRenderer

public javax.swing.table.TableCellRenderer getRenderer()
Description copied from interface: Variable
Returns the TableCellRenderer used to render the variable value.

This method is not used in Action(s) 1.0.

Specified by:
getRenderer in interface Variable
Returns:
the renderer


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.