info.magnolia.cms.core.version
Class MgnlVersioningNodeWrapper

java.lang.Object
  extended by info.magnolia.jcr.wrapper.DelegateNodeWrapper
      extended by info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper<MgnlVersioningContentDecorator>
          extended by info.magnolia.cms.core.version.MgnlVersioningNodeWrapper
All Implemented Interfaces:
Cloneable, javax.jcr.Item, javax.jcr.Node

public class MgnlVersioningNodeWrapper
extends ContentDecoratorNodeWrapper<MgnlVersioningContentDecorator>

Wrapper providing support for Magnolia specific versioning ops (by copy).


Field Summary
 
Fields inherited from class info.magnolia.jcr.wrapper.DelegateNodeWrapper
wrapped
 
Fields inherited from interface javax.jcr.Node
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
 
Constructor Summary
MgnlVersioningNodeWrapper(javax.jcr.Node node)
           
MgnlVersioningNodeWrapper(javax.jcr.Node node, MgnlVersioningContentDecorator mgnlVersioningContentDecorator)
           
 
Method Summary
 void remove()
          Remove version history while removing the content.
 void restore(String versionName, boolean removeExisting)
           
 void restore(javax.jcr.version.Version version, boolean removeExisting)
           
 void restore(javax.jcr.version.Version version, String relPath, boolean removeExisting)
           
 void restoreByLabel(String versionLabel, boolean removeExisting)
           
 
Methods inherited from class info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper
addNode, addNode, equals, getAncestor, getContentDecorator, getNode, getNodes, getNodes, getNodes, getParent, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSession, getWeakReferences, getWeakReferences, hashCode, hasNode, hasNodes, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setWrappedNode, wrapNode, wrapNodeIterator, wrapProperty, wrapPropertyIterator, wrapSession
 
Methods inherited from class info.magnolia.jcr.wrapper.DelegateNodeWrapper
accept, addMixin, canAddMixin, cancelMerge, checkin, checkout, clone, deepUnwrap, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getDepth, getIdentifier, getIndex, getLock, getMixinNodeTypes, getName, getPath, getPrimaryItem, getPrimaryNodeType, getSharedSet, getUUID, getVersionHistory, getWrappedNode, hasProperties, hasProperty, holdsLock, initClone, isCheckedOut, isLocked, isModified, isNew, isNode, isNodeType, isSame, lock, merge, orderBefore, refresh, removeMixin, removeShare, removeSharedSet, save, setPrimaryType, toString, unlock, update
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MgnlVersioningNodeWrapper

public MgnlVersioningNodeWrapper(javax.jcr.Node node)

MgnlVersioningNodeWrapper

public MgnlVersioningNodeWrapper(javax.jcr.Node node,
                                 MgnlVersioningContentDecorator mgnlVersioningContentDecorator)
Method Detail

restore

public void restore(String versionName,
                    boolean removeExisting)
             throws javax.jcr.version.VersionException,
                    javax.jcr.ItemExistsException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.lock.LockException,
                    javax.jcr.InvalidItemStateException,
                    javax.jcr.RepositoryException
Specified by:
restore in interface javax.jcr.Node
Overrides:
restore in class DelegateNodeWrapper
Throws:
javax.jcr.version.VersionException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException

restore

public void restore(javax.jcr.version.Version version,
                    boolean removeExisting)
             throws javax.jcr.version.VersionException,
                    javax.jcr.ItemExistsException,
                    javax.jcr.InvalidItemStateException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.lock.LockException,
                    javax.jcr.RepositoryException
Specified by:
restore in interface javax.jcr.Node
Overrides:
restore in class DelegateNodeWrapper
Throws:
javax.jcr.version.VersionException
javax.jcr.ItemExistsException
javax.jcr.InvalidItemStateException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException

restore

public void restore(javax.jcr.version.Version version,
                    String relPath,
                    boolean removeExisting)
             throws javax.jcr.PathNotFoundException,
                    javax.jcr.ItemExistsException,
                    javax.jcr.version.VersionException,
                    javax.jcr.nodetype.ConstraintViolationException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.lock.LockException,
                    javax.jcr.InvalidItemStateException,
                    javax.jcr.RepositoryException
Specified by:
restore in interface javax.jcr.Node
Overrides:
restore in class DelegateNodeWrapper
Throws:
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException

restoreByLabel

public void restoreByLabel(String versionLabel,
                           boolean removeExisting)
                    throws javax.jcr.version.VersionException,
                           javax.jcr.ItemExistsException,
                           javax.jcr.UnsupportedRepositoryOperationException,
                           javax.jcr.lock.LockException,
                           javax.jcr.InvalidItemStateException,
                           javax.jcr.RepositoryException
Specified by:
restoreByLabel in interface javax.jcr.Node
Overrides:
restoreByLabel in class DelegateNodeWrapper
Throws:
javax.jcr.version.VersionException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException

remove

public void remove()
            throws javax.jcr.RepositoryException
Remove version history while removing the content.

Specified by:
remove in interface javax.jcr.Item
Overrides:
remove in class DelegateNodeWrapper
Throws:
javax.jcr.RepositoryException


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.