D
- CommandActionDefinition
.public class DeleteAction<D extends CommandActionDefinition> extends AbstractCommandAction<D>
Modifier and Type | Field and Description |
---|---|
protected info.magnolia.event.EventBus |
eventBus |
protected List<JcrItemAdapter> |
items |
protected UiContext |
uiContext |
COMMAND_RESULT, LONG_RUNNING_ACTION_NOTIFICATION, PARALLEL_EXECUTION_NOT_ALLOWED_NOTIFICATION
Constructor and Description |
---|
DeleteAction(D definition,
JcrItemAdapter item,
info.magnolia.commands.CommandsManager commandsManager,
info.magnolia.event.EventBus eventBus,
UiContext uiContext,
info.magnolia.i18nsystem.SimpleTranslator i18n) |
DeleteAction(D definition,
List<JcrItemAdapter> items,
info.magnolia.commands.CommandsManager commandsManager,
info.magnolia.event.EventBus eventBus,
UiContext uiContext,
info.magnolia.i18nsystem.SimpleTranslator i18n) |
Modifier and Type | Method and Description |
---|---|
protected void |
executeOnItem(JcrItemAdapter item)
Handles the retrieval of the
Command instance defined in the CommandActionDefinition associated with this action and then
performs the actual command execution. |
protected String |
getFailureMessage()
Returns the message to display, if the execution fails on at least ONE item.
|
protected info.magnolia.i18nsystem.SimpleTranslator |
getI18n() |
protected String |
getSuccessMessage()
Returns the message to display, if the execution succeeds on ALL items.
|
protected void |
onPostExecute()
Post Command Execution.
|
protected void |
onPreExecute()
Pre Command Execution.
|
buildParams, getCommand, getCommandsManager, getParams, isInvokeAsynchronously, onError
execute, getCurrentItem, getErrorNotification, getFailedItems, getItemComparator, getItems, getSortedItems, getUiContext, setCurrentItem
getDefinition
protected final UiContext uiContext
protected final List<JcrItemAdapter> items
protected final info.magnolia.event.EventBus eventBus
public DeleteAction(D definition, JcrItemAdapter item, info.magnolia.commands.CommandsManager commandsManager, @Named(value="admincentral") info.magnolia.event.EventBus eventBus, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
public DeleteAction(D definition, List<JcrItemAdapter> items, info.magnolia.commands.CommandsManager commandsManager, @Named(value="admincentral") info.magnolia.event.EventBus eventBus, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
protected void onPreExecute() throws Exception
AbstractCommandAction
onPreExecute
in class AbstractCommandAction<D extends CommandActionDefinition>
Exception
protected void onPostExecute() throws Exception
AbstractCommandAction
onPostExecute
in class AbstractCommandAction<D extends CommandActionDefinition>
Exception
protected void executeOnItem(JcrItemAdapter item) throws ActionExecutionException
AbstractCommandAction
Command
instance defined in the CommandActionDefinition
associated with this action and then
performs the actual command execution.executeOnItem
in class AbstractCommandAction<D extends CommandActionDefinition>
ActionExecutionException
- if no command is found or if command execution throws an exception.protected String getSuccessMessage()
AbstractMultiItemAction
null
,
if the implementing action handles the user notification on its own.getSuccessMessage
in class AbstractCommandAction<D extends CommandActionDefinition>
protected String getFailureMessage()
AbstractMultiItemAction
null
,
if the implementing action handles the user notification on its own.getFailureMessage
in class AbstractCommandAction<D extends CommandActionDefinition>
protected info.magnolia.i18nsystem.SimpleTranslator getI18n()
getI18n
in class AbstractCommandAction<D extends CommandActionDefinition>
Copyright © 2017 Magnolia International Ltd.. All rights reserved.