com.jbbres.lib.actions.workflow
Class WorkflowDefinitionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jbbres.lib.actions.workflow.WorkflowDefinitionEvent
All Implemented Interfaces:
java.io.Serializable

public class WorkflowDefinitionEvent
extends java.util.EventObject

A semantic event which indicates that a change during the Workflow event related to the workflow definition occurred.

This event is generated by a Workflow during one of the stage of the action definition (such as at the adding or removing an action from the workflow).
The event is passed to every every WorkflowDefinitionListener object that registered to receive such events using the workflow' addWorkflowDefinitionListener(WorkflowDefinitionListener) method.

The object that implements the WorkflowDefinitionListener interface gets this WorkflowDefinitionEvent when the event occurs.


Release Notes:

v1.1.0:

  • Added notification management
  • Since:
    1.0.0
    Version:
    1.1.0
    Author:
    Jean-Baptiste Bres
    See Also:
    Serialized Form

    Constructor Summary
    WorkflowDefinitionEvent(Workflow source, Action action, int oldPosition)
              Instantiates a new event.
    WorkflowDefinitionEvent(Workflow source, Element element)
              Instantiates a new event.
    WorkflowDefinitionEvent(Workflow source, WorkflowDefinitionNotification notification)
              Instantiates a new event.
     
    Method Summary
     int getActionNewPosition()
              Returns the new position of the action that is at the origin of the event.
     int getActionPreviousPosition()
              Returns the previous position of the action that is at the origin of the event.
     Element getChangedElement()
              Returns the element that is at the origin of the event.
     WorkflowDefinitionNotification getNotification()
              Returns the workflow definition notification associated to the event, if any.
     Workflow getSourceWorkflow()
              Returns the workflow that has raised the event.
     
    Methods inherited from class java.util.EventObject
    getSource, toString
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    WorkflowDefinitionEvent

    public WorkflowDefinitionEvent(Workflow source,
                                   Action action,
                                   int oldPosition)
    Instantiates a new event.

    Parameters:
    source - - the workflow source of the event
    action - - the action that is the cause of the event
    oldPosition - - the previous position of the action, before the events occurs.

    WorkflowDefinitionEvent

    public WorkflowDefinitionEvent(Workflow source,
                                   Element element)
    Instantiates a new event.

    Parameters:
    source - - the workflow source of the event
    element - - the element that is the cause of the event

    WorkflowDefinitionEvent

    public WorkflowDefinitionEvent(Workflow source,
                                   WorkflowDefinitionNotification notification)
    Instantiates a new event.

    Parameters:
    source - - the workflow source of the event
    element - - the element that is the cause of the event
    Method Detail

    getSourceWorkflow

    public Workflow getSourceWorkflow()
    Returns the workflow that has raised the event.

    Returns:
    The workflow that has raised the event.

    getChangedElement

    public Element getChangedElement()
    Returns the element that is at the origin of the event.

    Returns:
    The element that is at the origin of the event.

    getActionNewPosition

    public int getActionNewPosition()
    Returns the new position of the action that is at the origin of the event.

    Returns:
    position in the workflow; returns -1 if the action have been removed.

    getActionPreviousPosition

    public int getActionPreviousPosition()
    Returns the previous position of the action that is at the origin of the event.

    Returns:
    previous position in the workflow; returns -1 if the action have been added.

    getNotification

    public WorkflowDefinitionNotification getNotification()
    Returns the workflow definition notification associated to the event, if any.

    Returns:
    the notification


    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.