org.deduced
Interface ActionInvoker

All Known Implementing Classes:
DefaultActionInvoker

public interface ActionInvoker

ActionInvoker is used to invoke actions on property collections

Author:
Steve McDuff

Method Summary
 java.lang.Object invokeAction(PropertyCollection<?,?> collection, java.lang.String actionName, InvocationParameter[] parameters)
          invoke an Action by name
 java.lang.Object invokeActionSilent(PropertyCollection<?,?> collection, java.lang.String actionName, InvocationParameter[] parameters)
          invoke an Action by name silently.
 

Method Detail

invokeAction

java.lang.Object invokeAction(PropertyCollection<?,?> collection,
                              java.lang.String actionName,
                              InvocationParameter[] parameters)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.reflect.InvocationTargetException,
                                     CompilationFailedException,
                                     java.lang.IllegalStateException
invoke an Action by name

Parameters:
collection - the property collection
actionName - the action name to invoke
parameters - the list of parameter and value to invoke. Any parameter not in this list will be assigned a default value. If a parameter doesn't have a default value, an InvocationTargetException will be thrown.
Returns:
the action return value
Throws:
java.lang.IllegalArgumentException - if some of the parameters are wrong or missing or the action fails to compile.
java.lang.reflect.InvocationTargetException - if the action code throws an exception.
java.lang.NullPointerException - if the collection or actionName parameters are null.
CompilationFailedException - if action failed to compile.
java.lang.IllegalStateException - if action isn't enabled.

invokeActionSilent

java.lang.Object invokeActionSilent(PropertyCollection<?,?> collection,
                                    java.lang.String actionName,
                                    InvocationParameter[] parameters)
invoke an Action by name silently. Meaning that all exceptions detected during the action execution will be logged but not thrown back.

Parameters:
collection - the property collection
actionName - the action name to invoke
parameters - the list of parameter and value to invoke. Any parameter not in this list will be assigned a default value. If a parameter doesn't have a default value, an InvocationTargetException will be thrown.
Returns:
the action return value