public class ExportAction extends AbstractCommandAction<ExportActionDefinition>
ExportActionDefinition
AbstractCommandAction.CommandActionTriggerListener
COMMAND_RESULT
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 |
openFileInBlankWindow(String fileName,
String mimeType) |
executeOnItem, getCommand, getCommandsManager, getFailureMessage, getParams, getSuccessMessage, isInvokeAsynchronously, onError, onPreExecute
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 onPostExecute() throws Exception
DeleteOnCloseFileInputStream
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 © 2015 Magnolia International Ltd.. All rights reserved.