D
- ActionDefinition
.public abstract class AbstractTaskAction<D extends ActionDefinition> extends AbstractAction<D>
Modifier and Type | Field and Description |
---|---|
protected static String |
ACTOR_ID |
protected static String |
DECISION |
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
AbstractTaskAction(D definition,
info.magnolia.task.Task task,
info.magnolia.task.TasksManager tasksManager,
DefaultTaskDetailPresenter taskPresenter,
Shell shell) |
Modifier and Type | Method and Description |
---|---|
protected void |
canExecuteTask(info.magnolia.task.Task task)
Deprecated.
since 5.4, use availability rules to check the allowed statuses.
|
void |
execute()
Executes the action.
|
protected abstract void |
executeTask(info.magnolia.task.TasksManager tasksManager,
info.magnolia.task.Task task)
Subclasses need to implement this method to actually execute the task.
|
protected Shell |
getShell()
Subclasses can use the shell e.g.
|
protected DefaultTaskDetailPresenter |
getTaskPresenter()
Subclasses can use the TaskPresenter to interact back with it and its parent presenter, i.e.
|
getDefinition
protected static final org.slf4j.Logger log
protected static final String DECISION
protected static final String ACTOR_ID
public AbstractTaskAction(D definition, info.magnolia.task.Task task, info.magnolia.task.TasksManager tasksManager, DefaultTaskDetailPresenter taskPresenter, Shell shell)
public final void execute() throws ActionExecutionException
Action
ActionExecutionException
- if an error occurs performing the actionprotected abstract void executeTask(info.magnolia.task.TasksManager tasksManager, info.magnolia.task.Task task)
@Deprecated protected void canExecuteTask(info.magnolia.task.Task task) throws IllegalStateException
IllegalStateException
- if a task status doesn't allow this action to be executed (e.g. trying to complete a task which is not in progress). In general, subclasses can throw this exception for any reason
they deem should cause the current task execution to be aborted.info.magnolia.ui.admincentral.shellapp.pulse.task.action.availability.TaskAvailabilityRule}
protected Shell getShell()
protected DefaultTaskDetailPresenter getTaskPresenter()
Copyright © 2015 Magnolia International Ltd.. All rights reserved.