public class ExportAction extends AbstractCommandAction<ExportActionDefinition>
ExportActionDefinition
COMMAND_RESULT, LONG_RUNNING_ACTION_NOTIFICATION, PARALLEL_EXECUTION_NOT_ALLOWED_NOTIFICATION
Constructor and Description |
---|
ExportAction(ExportActionDefinition definition,
JcrItemAdapter item,
info.magnolia.commands.CommandsManager commandsManager,
UiContext uiContext,
info.magnolia.i18nsystem.SimpleTranslator i18n) |
ExportAction(ExportActionDefinition definition,
JcrItemAdapter item,
info.magnolia.commands.CommandsManager commandsManager,
UiContext uiContext,
info.magnolia.i18nsystem.SimpleTranslator i18n,
EditorCallback callback) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
buildParams(javax.jcr.Item jcrItem)
Builds a map of parameters which will be passed to the current command
for execution.
|
protected info.magnolia.importexport.command.JcrExportCommand |
getCommand() |
protected void |
onError(Exception e)
Class that implement CommansActionBase should use
this in order to perform tasks or notification in case of error.
|
protected void |
onPostExecute()
After command execution we push the created file to the client browser.
The created data is put in the temporary file 'fileOutput' linked to 'fileOutputStream' sent to the export command. This temporary file is the used to create a FileInputStream that ensure that this temporary file is removed once the fileInputStream is closed by Vaadin resource component. |
protected void |
onPreExecute()
Pre Command Execution.
|
executeOnItem, getCommandsManager, getFailureMessage, getI18n, getParams, getSuccessMessage, isInvokeAsynchronously
execute, getCurrentItem, getErrorNotification, getFailedItems, getItemComparator, getItems, getSortedItems, getUiContext, setCurrentItem
getDefinition
public ExportAction(ExportActionDefinition definition, JcrItemAdapter item, info.magnolia.commands.CommandsManager commandsManager, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n, EditorCallback callback) throws ActionExecutionException
ActionExecutionException
public ExportAction(ExportActionDefinition definition, JcrItemAdapter item, info.magnolia.commands.CommandsManager commandsManager, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n) throws ActionExecutionException
ActionExecutionException
protected void onPreExecute() throws Exception
AbstractCommandAction
onPreExecute
in class AbstractCommandAction<ExportActionDefinition>
Exception
protected Map<String,Object> buildParams(javax.jcr.Item jcrItem)
AbstractCommandAction
AbstractCommandAction.onPreExecute()
. Default implementation returns
a map containing the parameters defined at
CommandActionDefinition.getParams()
. It also adds the following
parameters with values retrieved from the passed node.
protected Map<String, Object> buildParams(final Node node) { Map<String, Object> params = super.buildParams(node); params.put(Context.ATTRIBUTE_RECURSIVE, getDefinition().isRecursive()); return params; }
buildParams
in class AbstractCommandAction<ExportActionDefinition>
protected void onPostExecute() throws Exception
FileInputStream
that ensure that this temporary file is removed once the onPostExecute
in class AbstractCommandAction<ExportActionDefinition>
Exception
protected void onError(Exception e)
AbstractCommandAction
onError
in class AbstractCommandAction<ExportActionDefinition>
protected info.magnolia.importexport.command.JcrExportCommand getCommand()
getCommand
in class AbstractCommandAction<ExportActionDefinition>
Copyright © 2018 Magnolia International Ltd.. All rights reserved.