com.jaxfront.core.rule
Class UIAction

java.lang.Object
  extended by com.jaxfront.core.rule.AbstractAction
      extended by com.jaxfront.core.rule.UIAction
All Implemented Interfaces:
IAction, java.io.Serializable, java.lang.Cloneable

public class UIAction
extends AbstractAction

Defines an ui action (visual action) which will invoke any kind of method on any visualizer.

See Also:
Serialized Form

Field Summary
static java.lang.String METHOD_SET_CHOICE_ENABLED
           
static java.lang.String METHOD_SET_CODESET_VALUES
           
static java.lang.String METHOD_SET_EDITABLE
           
static java.lang.String METHOD_SET_ENABLED
           
static java.lang.String METHOD_SHOW_MESSAGE
           
 
Fields inherited from interface com.jaxfront.core.rule.IAction
TYPE_ABSTRACT, TYPE_FORMULA, TYPE_JAVA, TYPE_MODEL, TYPE_UI
 
Constructor Summary
UIAction(Document DOM, Type sourceType, Type xuiType, java.lang.String targetXPath, java.lang.String methodName, MethodParameter[] params, java.lang.String className)
          Creates a ui action based on a document, a source type,an xpath, a methodName and the parameters to invoke.
 
Method Summary
 void check(Document dom, Type target)
           
 int getActionType()
           
 java.lang.String getMethodName()
          Returns the method name.
 java.lang.Object[] getParameterValues()
          Returns a list of the passing parameter values for the method to invoke.
 void invoke(Document dom, java.lang.Object target, java.lang.Object[] values)
           
 boolean isInversable()
          Indicates if an action is able to invoke inverse.
 void release()
           
 java.lang.String toString()
           
 
Methods inherited from class com.jaxfront.core.rule.AbstractAction
checkAction, clone, fireChange, getDOM, getExpression, getInverseAction, getSource, getTargetTypes, getTargetXPath, getUserAction, isEmpty, isUsingUserAction, perform, perform, perform, performInverse, setFireChange, setInverseAction, setSource, setTargetXPath, setUseActionTargetAsBase
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

METHOD_SET_CHOICE_ENABLED

public static final java.lang.String METHOD_SET_CHOICE_ENABLED
See Also:
Constant Field Values

METHOD_SET_CODESET_VALUES

public static final java.lang.String METHOD_SET_CODESET_VALUES
See Also:
Constant Field Values

METHOD_SET_EDITABLE

public static final java.lang.String METHOD_SET_EDITABLE
See Also:
Constant Field Values

METHOD_SET_ENABLED

public static final java.lang.String METHOD_SET_ENABLED
See Also:
Constant Field Values

METHOD_SHOW_MESSAGE

public static final java.lang.String METHOD_SHOW_MESSAGE
See Also:
Constant Field Values
Constructor Detail

UIAction

public UIAction(Document DOM,
                Type sourceType,
                Type xuiType,
                java.lang.String targetXPath,
                java.lang.String methodName,
                MethodParameter[] params,
                java.lang.String className)
Creates a ui action based on a document, a source type,an xpath, a methodName and the parameters to invoke.

Parameters:
DOM - JAXFront document
sourceType - the source type of this action
targetXPath - the target xpath
methodName - method name to invoke
params - method parameters to send
className - user defined action implementation class name
Method Detail

check

public void check(Document dom,
                  Type target)
           throws RuleInvocationException
Specified by:
check in class AbstractAction
Throws:
RuleInvocationException

getActionType

public int getActionType()
Specified by:
getActionType in interface IAction
Overrides:
getActionType in class AbstractAction
Returns:
the action type 0 = Abstract Action, 1 = ModelAction, 2 = Formula Action ,3 = UI Action, 4 = Java Action ;

getMethodName

public java.lang.String getMethodName()
Returns the method name.


getParameterValues

public java.lang.Object[] getParameterValues()
Returns a list of the passing parameter values for the method to invoke.


invoke

public void invoke(Document dom,
                   java.lang.Object target,
                   java.lang.Object[] values)
            throws RuleInvocationException,
                   java.lang.IllegalArgumentException,
                   java.lang.IllegalAccessException,
                   java.lang.reflect.InvocationTargetException
Throws:
RuleInvocationException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

isInversable

public boolean isInversable()
Indicates if an action is able to invoke inverse. If all the passing parameter values are of type Boolean. This action is inversable by default.

Overrides:
isInversable in class AbstractAction

release

public void release()
Specified by:
release in interface IAction
Overrides:
release in class AbstractAction
See Also:
AbstractAction.release()

toString

public java.lang.String toString()
Overrides:
toString in class AbstractAction