net.sf.doolin.gui.action
Class GUITaskAction<B,R>

java.lang.Object
  extended by net.sf.doolin.gui.action.AbstractGUIAction
      extended by net.sf.doolin.gui.action.AbstractSimpleGUIAction
          extended by net.sf.doolin.gui.action.GUITaskAction<B,R>
Type Parameters:
B - Type of the input to the GUITask
R - Type of the return from the GUITask
All Implemented Interfaces:
GUIAction, org.springframework.beans.factory.BeanNameAware

public class GUITaskAction<B,R>
extends AbstractSimpleGUIAction

This action launches a GUITask using an associated GUITaskExecutor.

Author:
Damien Coraboeuf

Constructor Summary
GUITaskAction()
           
 
Method Summary
protected  void doExecute(ActionContext context)
          Executes the action and throws any kind of error.
 String getPrompt()
          Gets the expression that is used to prompt the user before the task is executed.
 void setPrompt(String prompt)
          Sets the expression that is used to prompt the user before the task is executed.
 void setTask(GUITask<B,R> task)
          Sets the task to execute.
 void setTaskExecutor(GUITaskExecutor<B,R> taskExecutor)
          Sets the task executor used to execute the task
 void setUseContextData(boolean useContextData)
          Deprecated. Use AbstractGUIAction.setActionContextDataExtractor(net.sf.doolin.gui.action.support.ActionContextDataExtractor)
 
Methods inherited from class net.sf.doolin.gui.action.AbstractSimpleGUIAction
getIconId, getIconIDExpression, getId, getShortcut, getShortcutExpression, getTextExpression, getTip, getTipExpression, getTitle, init, setBeanName, setIconId, setShortcut, setTip, setTitle, toString
 
Methods inherited from class net.sf.doolin.gui.action.AbstractGUIAction
execute, getActionContextData, getActionContextDataExtractor, getDisplayStateHandler, getIcon, getIconService, setActionContextDataExtractor, setDisplayStateHandler, setIconService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GUITaskAction

public GUITaskAction()
Method Detail

doExecute

protected void doExecute(ActionContext context)
                  throws Exception
Description copied from class: AbstractGUIAction
Executes the action and throws any kind of error.

Specified by:
doExecute in class AbstractGUIAction
Parameters:
context - the context
Throws:
Exception - the exception

getPrompt

public String getPrompt()
Gets the expression that is used to prompt the user before the task is executed. If this expression is not defined, no prompt is displayed to the user.

Returns:
Expression or null to disable the prompt.

setPrompt

public void setPrompt(String prompt)
Sets the expression that is used to prompt the user before the task is executed. If this expression is not defined, no prompt is displayed to the user. Its default value is null.

Parameters:
prompt - Expression or null to disable the prompt.

setTask

public void setTask(GUITask<B,R> task)
Sets the task to execute.

Parameters:
task - Task to execute

setTaskExecutor

public void setTaskExecutor(GUITaskExecutor<B,R> taskExecutor)
Sets the task executor used to execute the task

Parameters:
taskExecutor - Task executor

setUseContextData

@Deprecated
public void setUseContextData(boolean useContextData)
Deprecated. Use AbstractGUIAction.setActionContextDataExtractor(net.sf.doolin.gui.action.support.ActionContextDataExtractor)

Sets if the input of the task must be the contextual data or the data of the action context.

Parameters:
useContextData - true if the contextual data must be used.


Copyright © 2011. All Rights Reserved.