info.magnolia.jcr.wrapper
Class InheritanceNodeWrapper

java.lang.Object
  extended by info.magnolia.jcr.wrapper.DelegateNodeWrapper
      extended by info.magnolia.jcr.wrapper.ChildWrappingNodeWrapper
          extended by info.magnolia.jcr.wrapper.InheritanceNodeWrapper
All Implemented Interfaces:
NodeWrapperFactory, Cloneable, javax.jcr.Item, javax.jcr.Node

Deprecated. since 4.5.9 use InheritanceContentDecorator

public class InheritanceNodeWrapper
extends ChildWrappingNodeWrapper

This wrapper inherits nodes from the parent hierarchy. The method isAnchor() defines the anchor to which the inheritance is performed relative to. By default the anchor is of type (mgnl:content).

The inheritance is then performed as follows:

The getNodes() and getNodes(String) methods merge the direct and inherited children by first adding the inherited children to the iterator and then the direct children.


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
InheritanceNodeWrapper(javax.jcr.Node node)
          Deprecated.  
InheritanceNodeWrapper(javax.jcr.Node node, AbstractPredicate<javax.jcr.Node> filter)
          Deprecated.  
InheritanceNodeWrapper(javax.jcr.Node node, javax.jcr.Node start)
          Deprecated.  
InheritanceNodeWrapper(javax.jcr.Node node, javax.jcr.Node start, AbstractPredicate<javax.jcr.Node> filter)
          Deprecated.  
 
Method Summary
protected  InheritanceNodeWrapper findAnchor()
          Deprecated. Find the anchor for this node.
protected  InheritanceNodeWrapper findNextAnchor()
          Deprecated. Find next anchor.
 javax.jcr.Node getNode(String relPath)
          Deprecated.  
 javax.jcr.NodeIterator getNodes()
          Deprecated.  
 javax.jcr.NodeIterator getNodes(String namePattern)
          Deprecated.  
protected  javax.jcr.Node getNodeSafely(InheritanceNodeWrapper anchor, String path)
          Deprecated. This method returns null if no node has been found.
protected  javax.jcr.Node getNodeSafely(String relPath)
          Deprecated. This method returns null if no node has been found.
 javax.jcr.Property getProperty(String relPath)
          Deprecated.  
 boolean hasNode(String relPath)
          Deprecated.  
 boolean hasProperty(String name)
          Deprecated.  
protected  boolean isAnchor()
          Deprecated. True if this node is an anchor.
 boolean isInherited()
          Deprecated. True if this is not a sub node of the starting point.
protected  String resolveInnerPath()
          Deprecated. Returns the inner path of the this node up to the anchor.
 void setWrappedNode(javax.jcr.Node node)
          Deprecated.  
 javax.jcr.Node wrapNode(javax.jcr.Node node)
          Deprecated.  
 
Methods inherited from class info.magnolia.jcr.wrapper.ChildWrappingNodeWrapper
addNode, addNode, getNodes, wrapNodeIterator
 
Methods inherited from class info.magnolia.jcr.wrapper.DelegateNodeWrapper
accept, addMixin, canAddMixin, cancelMerge, checkin, checkout, clone, deepUnwrap, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getAncestor, getBaseVersion, getCorrespondingNodePath, getDefinition, getDepth, getIdentifier, getIndex, getLock, getMixinNodeTypes, getName, getParent, getPath, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getReferences, getReferences, getSession, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, getWrappedNode, hasNodes, hasProperties, holdsLock, initClone, isCheckedOut, isLocked, isModified, isNew, isNode, isNodeType, isSame, lock, merge, orderBefore, refresh, remove, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, save, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, toString, unlock, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InheritanceNodeWrapper

public InheritanceNodeWrapper(javax.jcr.Node node)
Deprecated. 

InheritanceNodeWrapper

public InheritanceNodeWrapper(javax.jcr.Node node,
                              AbstractPredicate<javax.jcr.Node> filter)
Deprecated. 

InheritanceNodeWrapper

public InheritanceNodeWrapper(javax.jcr.Node node,
                              javax.jcr.Node start,
                              AbstractPredicate<javax.jcr.Node> filter)
Deprecated. 

InheritanceNodeWrapper

public InheritanceNodeWrapper(javax.jcr.Node node,
                              javax.jcr.Node start)
Deprecated. 
Method Detail

setWrappedNode

public void setWrappedNode(javax.jcr.Node node)
Deprecated. 
Overrides:
setWrappedNode in class DelegateNodeWrapper

findAnchor

protected InheritanceNodeWrapper findAnchor()
                                     throws javax.jcr.RepositoryException
Deprecated. 
Find the anchor for this node.

Throws:
javax.jcr.RepositoryException

findNextAnchor

protected InheritanceNodeWrapper findNextAnchor()
                                         throws javax.jcr.RepositoryException
Deprecated. 
Find next anchor.

Throws:
javax.jcr.RepositoryException

isAnchor

protected boolean isAnchor()
Deprecated. 
True if this node is an anchor. By default true if this node is of type NodeTypes.Content.NAME.


getNodeSafely

protected javax.jcr.Node getNodeSafely(String relPath)
                                throws javax.jcr.RepositoryException
Deprecated. 
This method returns null if no node has been found.

Throws:
javax.jcr.RepositoryException

resolveInnerPath

protected String resolveInnerPath()
                           throws javax.jcr.RepositoryException
Deprecated. 
Returns the inner path of the this node up to the anchor.

Throws:
javax.jcr.RepositoryException

getNodeSafely

protected javax.jcr.Node getNodeSafely(InheritanceNodeWrapper anchor,
                                       String path)
                                throws javax.jcr.RepositoryException
Deprecated. 
This method returns null if no node has been found.

Throws:
javax.jcr.RepositoryException

hasNode

public boolean hasNode(String relPath)
                throws javax.jcr.RepositoryException
Deprecated. 
Specified by:
hasNode in interface javax.jcr.Node
Overrides:
hasNode in class DelegateNodeWrapper
Throws:
javax.jcr.RepositoryException

getNode

public javax.jcr.Node getNode(String relPath)
                       throws javax.jcr.PathNotFoundException,
                              javax.jcr.RepositoryException
Deprecated. 
Specified by:
getNode in interface javax.jcr.Node
Overrides:
getNode in class ChildWrappingNodeWrapper
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

getNodes

public javax.jcr.NodeIterator getNodes()
                                throws javax.jcr.RepositoryException
Deprecated. 
Specified by:
getNodes in interface javax.jcr.Node
Overrides:
getNodes in class ChildWrappingNodeWrapper
Throws:
javax.jcr.RepositoryException

getNodes

public javax.jcr.NodeIterator getNodes(String namePattern)
                                throws javax.jcr.RepositoryException
Deprecated. 
Specified by:
getNodes in interface javax.jcr.Node
Overrides:
getNodes in class ChildWrappingNodeWrapper
Throws:
javax.jcr.RepositoryException

getProperty

public javax.jcr.Property getProperty(String relPath)
                               throws javax.jcr.PathNotFoundException,
                                      javax.jcr.RepositoryException
Deprecated. 
Specified by:
getProperty in interface javax.jcr.Node
Overrides:
getProperty in class DelegateNodeWrapper
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

hasProperty

public boolean hasProperty(String name)
                    throws javax.jcr.RepositoryException
Deprecated. 
Specified by:
hasProperty in interface javax.jcr.Node
Overrides:
hasProperty in class DelegateNodeWrapper
Throws:
javax.jcr.RepositoryException

isInherited

public boolean isInherited()
Deprecated. 
True if this is not a sub node of the starting point.


wrapNode

public javax.jcr.Node wrapNode(javax.jcr.Node node)
Deprecated. 
Specified by:
wrapNode in interface NodeWrapperFactory
Overrides:
wrapNode in class ChildWrappingNodeWrapper


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