public class ExportYamlAction extends AbstractCommandAction<ExportYamlActionDefinition>
ExportJcrNodeToYamlCommand
to perform the export operation.
Then sends the result to the client browser.ExportYamlActionDefinition
COMMAND_RESULT, LONG_RUNNING_ACTION_NOTIFICATION, PARALLEL_EXECUTION_NOT_ALLOWED_NOTIFICATION
Constructor and Description |
---|
ExportYamlAction(ExportYamlActionDefinition 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()
Post Command Execution.
|
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 ExportYamlAction(ExportYamlActionDefinition 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<ExportYamlActionDefinition>
Exception
protected void onPostExecute() throws Exception
AbstractCommandAction
onPostExecute
in class AbstractCommandAction<ExportYamlActionDefinition>
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<ExportYamlActionDefinition>
Copyright © 2015 Magnolia International Ltd.. All rights reserved.