V - The target class this action operates on.public class G9Action<V> extends Object implements Callable<V>
| Modifier and Type | Field and Description |
|---|---|
protected ActionTask<V> |
actionTask
The actual task to perform
|
protected boolean |
CANCELLED
Flag - true if action is cancelled.
|
protected static HookInvoker |
hookInvoker
The hook invoker
|
| Modifier | Constructor and Description |
|---|---|
protected |
G9Action(ActionType actionType,
ActionTarget actionTarget,
ActionTask<V> actionTask,
Class<V> resultClass,
ApplicationController applicationController)
Constructs a new g9 action
|
protected |
G9Action(ActionType actionType,
ActionTarget actionTarget,
ActionTask<V> actionTask,
Class<V> resultClass,
DialogController dialogController)
Constructs a new g9 action
|
| Modifier and Type | Method and Description |
|---|---|
V |
call()
Performs the action and invokes hooks.
|
void |
cancel()
Cancel the action.
|
protected void |
cleanUpHook()
Decouples the relation between this action and the action hook.
|
protected ActionHookList<V> |
getActionHookList()
Returns the list of action hooks used by this action.
|
Object |
getActionSetupValue()
Get the action setup value.
|
ActionTarget |
getActionTarget()
Gets the action target
|
protected ActionTask<V> |
getActionTask()
Gets the callable action task of this action
|
ActionType |
getActionType()
Returns the action type of this action
|
ApplicationController |
getApplicationController()
Gets the application controller that initiated this action
|
DialogController |
getController()
Returns the dialog controller that initiated this action
|
protected List<no.esito.jvine.model.CurrentRoleObject> |
getCurrentInstanceList() |
DialogController |
getDialogController() |
EventContext |
getEvent()
Get the event that triggered this action.
|
Boolean |
getFlag()
Get the general purpose FLAG value.
|
HookInvoker |
getHookInvoker() |
static no.esito.log.Logger |
getLog() |
no.esito.jvine.view.MessageUtil |
getMessageUtil() |
Class<V> |
getResultClas() |
protected Class<V> |
getResultClass()
Gets the result class
|
protected ThreadType |
getThreadType(String methodName,
Class... params)
Utility method, returns the thread type the method is annotated with.
|
protected boolean |
hasHook()
Check if this action has an associated hook.
|
boolean |
isCancelled()
Check if this action is cancelled.
|
protected boolean |
isInvokeHooksOn()
Test whether hooks are turned on or off.
|
protected void |
setActionHookList(ActionHookList<V> actionHookList)
Sets the list of action hooks to be used by this action.
|
void |
setActionSetupValue(Object setupValue)
Set the action setup value.
|
void |
setEvent(EventContext event)
Set the event that triggered this action.
|
void |
setFlag(Boolean flagValue)
Set a general purpose flag.
|
static void |
setLog(no.esito.log.Logger log) |
protected boolean |
shouldInvokeHook()
Test if hook should be invoked.
|
String |
toString() |
protected static final HookInvoker hookInvoker
protected ActionTask<V> actionTask
protected volatile boolean CANCELLED
protected G9Action(ActionType actionType, ActionTarget actionTarget, ActionTask<V> actionTask, Class<V> resultClass, DialogController dialogController)
actionType - the action typeactionTarget - the action targetactionTask - the callable implementing the action taskresultClass - the target classdialogController - the dialog controller that initiated this actionprotected G9Action(ActionType actionType, ActionTarget actionTarget, ActionTask<V> actionTask, Class<V> resultClass, ApplicationController applicationController)
actionType - the action typeactionTarget - the action targetactionTask - the callable implementing the action taskresultClass - the target classapplicationController - the dialog controller that initiated this
actionpublic no.esito.jvine.view.MessageUtil getMessageUtil()
public Boolean getFlag()
getFlag()public void setFlag(Boolean flagValue)
flagValue - the value of the flag.public EventContext getEvent()
public void setEvent(EventContext event)
event - the triggering eventpublic HookInvoker getHookInvoker()
public static no.esito.log.Logger getLog()
public static void setLog(no.esito.log.Logger log)
log - Loggerpublic DialogController getDialogController()
protected final boolean isInvokeHooksOn()
true if the hook mechanism is turned on.public final DialogController getController()
public final ApplicationController getApplicationController()
protected ActionTask<V> getActionTask()
public boolean isCancelled()
Synchronizes on "this".
true if this action is cancelledpublic void cancel()
Synchronizes on "this".
public Object getActionSetupValue()
setActionSetupValue(Object)public void setActionSetupValue(Object setupValue)
Note: Although the type of the value parameter is
Object one must make sure that the actual type matches the
expected parameter type; e.g. for the Open action, the parameter
type is no.g9.client.core.controller.DialogSetupValue.
setupValue - the action setup parameterprotected List<no.esito.jvine.model.CurrentRoleObject> getCurrentInstanceList()
public V call() throws Exception
protected void cleanUpHook()
throws InterruptedException
InterruptedException - if interrupted while waiting for the action
to finish.public ActionTarget getActionTarget()
protected ActionHookList<V> getActionHookList()
protected void setActionHookList(ActionHookList<V> actionHookList)
actionHookList - the action hook list of this actionprotected ThreadType getThreadType(String methodName, Class... params)
methodName - the declared method nameparams - the method parametersprotected boolean hasHook()
protected boolean shouldInvokeHook()
true if hooks should be invoked.public ActionType getActionType()
Copyright © 2006–2020 Esito AS. All rights reserved.