info.magnolia.commands.impl
Class RestorePreviousVersionCommand
java.lang.Object
info.magnolia.commands.MgnlCommand
info.magnolia.commands.impl.BaseRepositoryCommand
info.magnolia.commands.impl.RestorePreviousVersionCommand
- All Implemented Interfaces:
- Command, Cloneable
public class RestorePreviousVersionCommand
- extends BaseRepositoryCommand
Command to restore a node and all its descendants to their previous version.
Method Summary |
boolean |
execute(Context context)
This is the actual method to be overridden in descendant classes. |
boolean |
isParentNodeTypeOnly()
|
protected void |
restoreAllChildren(javax.jcr.Node node,
String parentNodeType)
Restores all descendants whose type is in the mgnl: namespace (default behavior) or will only restore descendants of the same types of the parent. |
RestorePreviousVersionCommand
@Inject
public RestorePreviousVersionCommand(VersionManager versionManager)
execute
public boolean execute(Context context)
throws Exception
- Description copied from class:
MgnlCommand
- This is the actual method to be overridden in descendant classes.
- Specified by:
execute
in class MgnlCommand
- Throws:
Exception
restoreAllChildren
protected void restoreAllChildren(javax.jcr.Node node,
String parentNodeType)
throws javax.jcr.RepositoryException
- Restores all descendants whose type is in the
mgnl:
namespace (default behavior) or will only restore descendants of the same types of the parent.
- Throws:
javax.jcr.RepositoryException
- See Also:
isParentNodeTypeOnly()
isParentNodeTypeOnly
public boolean isParentNodeTypeOnly()
- Returns:
- true if the command context contains an
parentNodeTypeOnly
parameter whose value is true, false (default setting) otherwise.
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.