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) |
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 void |
onPostExecute()
After command execution we push the created XML to the client browser.
|
protected void |
onPreExecute()
Pre Command Execution.
|
executeOnItem, getCommand, getCommandsManager, getFailureMessage, getParams, getSuccessMessage, isInvokeAsynchronously, onError
execute, getCurrentItem, getErrorNotification, getFailedItems, getItemComparator, getItems, getSortedItems, getUiContext, setCurrentItem
getDefinition
@Inject 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 void onPostExecute() throws Exception
FileInputStream
that ensure that this temporary file is removed once the onPostExecute
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>
Copyright © 2017 Magnolia International Ltd.. All rights reserved.