JSCAPE MFT Server

com.jscape.inet.mft.workflow
Class AbstractAction

java.lang.Object
  extended by com.jscape.inet.mft.workflow.AbstractAction
All Implemented Interfaces:
Action

public abstract class AbstractAction
extends java.lang.Object
implements Action

Introduces a basic implementation of the Action interface and simplifies further actions development.

Author:
Alex

Nested Class Summary
static class AbstractAction.LogActionField
           
 
Nested classes/interfaces inherited from interface com.jscape.inet.mft.workflow.Action
Action.ActionException
 
Field Summary
static PropertyDescriptor ACTION_PRIORITY_DESCRIPTOR
          A property descriptor for 'Priority' property.
static int DEFAULT_PRIORITY
          Default action priority.
static PropertyDescriptor LOG_ACTION_DESCRIPTOR
          A property descriptor for 'LogAction' property.
static PropertyDescriptor TRIGGER_ERROR_MESSAGE_DESCRIPTOR
          A property descriptor for 'TriggerErrorMessage' property.
 
Method Summary
 void execute(com.jscape.util.event.EventContext context, java.lang.String triggerName)
          Executes action for specified event context and trigger name.
 int getPriority()
          Returns the action priority.
 java.lang.String getPropertyDescription(java.lang.String propertyName)
          Returns action property description.
 java.lang.String getPropertyExample(java.lang.String propertyName)
          Returns action property usage example.
 java.lang.String getResultMessage()
          Returns result message for logging.
 java.lang.String getTriggerErrorMessage()
          Returns an error message passed to Trigger Error Event.
 java.lang.String getTriggerName()
          Returns parent trigger name.
 boolean isLogAction()
          Returns action loggable flag.
 boolean isSuccess()
          Returns action success flag.
 void setEvent(java.lang.Object event)
          Sets the event object.
 void setEventContext(java.util.Map<java.lang.String,java.lang.Object> value)
          Sets action event context as a map of event property name to property value.
 void setLogAction(boolean value)
          Sets action loggable flag.
 void setPriority(int value)
          Sets the action priority.
 void setTriggerErrorMessage(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jscape.inet.mft.workflow.Action
getDescription, getPropertyDescriptors
 

Field Detail

ACTION_PRIORITY_DESCRIPTOR

public static final PropertyDescriptor ACTION_PRIORITY_DESCRIPTOR
A property descriptor for 'Priority' property.


TRIGGER_ERROR_MESSAGE_DESCRIPTOR

public static final PropertyDescriptor TRIGGER_ERROR_MESSAGE_DESCRIPTOR
A property descriptor for 'TriggerErrorMessage' property.


LOG_ACTION_DESCRIPTOR

public static final PropertyDescriptor LOG_ACTION_DESCRIPTOR
A property descriptor for 'LogAction' property.


DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
Default action priority.

See Also:
Constant Field Values
Method Detail

getPropertyDescription

public java.lang.String getPropertyDescription(java.lang.String propertyName)
Description copied from interface: Action
Returns action property description. Used for creating action properties help panel in Manager GUI.

Specified by:
getPropertyDescription in interface Action
Parameters:
propertyName - the property name
Returns:
property description text

getPropertyExample

public java.lang.String getPropertyExample(java.lang.String propertyName)
Description copied from interface: Action
Returns action property usage example. Used for creating action properties help panel in Manager GUI.

Specified by:
getPropertyExample in interface Action
Parameters:
propertyName - the property name
Returns:
property usage example

isLogAction

public boolean isLogAction()
Description copied from interface: Action
Returns action loggable flag.

Specified by:
isLogAction in interface Action
Returns:
true if action should be logged; false otherwise

setLogAction

public void setLogAction(boolean value)
Description copied from interface: Action
Sets action loggable flag.

Specified by:
setLogAction in interface Action
Parameters:
value - if true action will be logged

getTriggerName

public java.lang.String getTriggerName()
Description copied from interface: Action
Returns parent trigger name.

Specified by:
getTriggerName in interface Action
Returns:
parent trigger name

getResultMessage

public java.lang.String getResultMessage()
Description copied from interface: Action
Returns result message for logging.

Specified by:
getResultMessage in interface Action
Returns:
a result message

getTriggerErrorMessage

public java.lang.String getTriggerErrorMessage()
Description copied from interface: Action
Returns an error message passed to Trigger Error Event.

Specified by:
getTriggerErrorMessage in interface Action
Returns:
an error message

setTriggerErrorMessage

public void setTriggerErrorMessage(java.lang.String value)

isSuccess

public boolean isSuccess()
Description copied from interface: Action
Returns action success flag.

Specified by:
isSuccess in interface Action
Returns:
true if action was successful executed; false otherwise

setEvent

public void setEvent(java.lang.Object event)
Description copied from interface: Action
Sets the event object.

Specified by:
setEvent in interface Action
Parameters:
event - an event object

setEventContext

public void setEventContext(java.util.Map<java.lang.String,java.lang.Object> value)
Description copied from interface: Action
Sets action event context as a map of event property name to property value.

Specified by:
setEventContext in interface Action
Parameters:
value - event context

getPriority

public int getPriority()
Description copied from interface: Action
Returns the action priority.

Specified by:
getPriority in interface Action
Returns:
the action priority

setPriority

public void setPriority(int value)
Description copied from interface: Action
Sets the action priority.

Specified by:
setPriority in interface Action
Parameters:
value - the action priority

execute

public void execute(com.jscape.util.event.EventContext context,
                    java.lang.String triggerName)
             throws Action.ActionException
Description copied from interface: Action
Executes action for specified event context and trigger name.

Specified by:
execute in interface Action
Parameters:
context - an event context
triggerName - a trigger name
Throws:
Action.ActionException - if an execution error occurs

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2013. All Rights Reserved