|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.jcr.wrapper.DelegateNodeWrapper info.magnolia.jcr.wrapper.ChildWrappingNodeWrapper info.magnolia.jcr.wrapper.InheritanceNodeWrapper
InheritanceContentDecorator
public class InheritanceNodeWrapper
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 java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InheritanceNodeWrapper(javax.jcr.Node node)
public InheritanceNodeWrapper(javax.jcr.Node node, AbstractPredicate<javax.jcr.Node> filter)
public InheritanceNodeWrapper(javax.jcr.Node node, javax.jcr.Node start, AbstractPredicate<javax.jcr.Node> filter)
public InheritanceNodeWrapper(javax.jcr.Node node, javax.jcr.Node start)
Method Detail |
---|
public void setWrappedNode(javax.jcr.Node node)
setWrappedNode
in class DelegateNodeWrapper
protected InheritanceNodeWrapper findAnchor() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected InheritanceNodeWrapper findNextAnchor() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected boolean isAnchor()
MgnlNodeType.NT_CONTENT
.
protected javax.jcr.Node getNodeSafely(String relPath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected String resolveInnerPath() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node getNodeSafely(InheritanceNodeWrapper anchor, String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean hasNode(String relPath) throws javax.jcr.RepositoryException
hasNode
in interface javax.jcr.Node
hasNode
in class DelegateNodeWrapper
javax.jcr.RepositoryException
public javax.jcr.Node getNode(String relPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getNode
in interface javax.jcr.Node
getNode
in class ChildWrappingNodeWrapper
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public javax.jcr.NodeIterator getNodes() throws javax.jcr.RepositoryException
getNodes
in interface javax.jcr.Node
getNodes
in class ChildWrappingNodeWrapper
javax.jcr.RepositoryException
public javax.jcr.NodeIterator getNodes(String namePattern) throws javax.jcr.RepositoryException
getNodes
in interface javax.jcr.Node
getNodes
in class ChildWrappingNodeWrapper
javax.jcr.RepositoryException
public javax.jcr.Property getProperty(String relPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
getProperty
in interface javax.jcr.Node
getProperty
in class DelegateNodeWrapper
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public boolean hasProperty(String name) throws javax.jcr.RepositoryException
hasProperty
in interface javax.jcr.Node
hasProperty
in class DelegateNodeWrapper
javax.jcr.RepositoryException
public boolean isInherited()
public javax.jcr.Node wrapNode(javax.jcr.Node node)
wrapNode
in interface NodeWrapperFactory
wrapNode
in class ChildWrappingNodeWrapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |