public class RestorePreviousVersionCommand extends RuleBasedCommand
ATTRIBUTE_RULE
CONTINUE_PROCESSING, PROCESSING_COMPLETE
Constructor and Description |
---|
RestorePreviousVersionCommand(VersionManager versionManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(Context context)
This is the actual method to be overridden in descendant classes.
|
protected Rule |
getDefaultRule() |
boolean |
isParentNodeTypeOnly() |
protected void |
restoreAllChildren(javax.jcr.Node node,
String parentNodeType)
Restores all descendant nodes according to the following strategy:
Restore descendants of the same type as the parent, if
isParentNodeTypeOnly() is set to true
Restore descendants according to the configured Rule for allowed node-types
Restore descendants whose type is in the mgnl: namespace (fallback behavior). |
getItemTypes, getRule, release, setItemTypes, setRule
getJCRNode, getNode, getPath, getRepository, getUuid, setPath, setRepository, setUuid
clone, execute, isEnabled, setEnabled
@Inject public RestorePreviousVersionCommand(VersionManager versionManager)
public boolean execute(Context context) throws Exception
MgnlCommand
execute
in class MgnlCommand
Exception
protected Rule getDefaultRule()
getDefaultRule
in class RuleBasedCommand
protected void restoreAllChildren(javax.jcr.Node node, String parentNodeType) throws javax.jcr.RepositoryException
isParentNodeTypeOnly()
is set to true
Rule
for allowed node-types
mgnl:
namespace (fallback behavior).
javax.jcr.RepositoryException
isParentNodeTypeOnly()
,
RuleBasedCommand.getRule()
public boolean isParentNodeTypeOnly()
parentNodeTypeOnly
parameter whose value is true, false (default setting) otherwise.Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.