public class InheritanceContentDecorator extends AbstractContentDecorator implements Cloneable
Modifier and Type | Class and Description |
---|---|
class |
InheritanceContentDecorator.DestinationNodeInheritanceNodeWrapper
Wrapper applied to the destination node.
|
Constructor and Description |
---|
InheritanceContentDecorator(javax.jcr.Node destination) |
Modifier and Type | Method and Description |
---|---|
void |
addSource(javax.jcr.Node source) |
protected javax.jcr.PropertyIterator |
combinePropertyIterators(javax.jcr.PropertyIterator destinationProperties,
List<javax.jcr.PropertyIterator> sourceProperties)
Combines the inherited properties and provides them as a
PropertyIterator . |
javax.jcr.Node |
getDestination() |
protected boolean |
inheritsNodes(javax.jcr.Node node)
Decides if a node inherits child nodes.
|
protected boolean |
inheritsProperties(javax.jcr.Node node)
Decides if a node inherits properties.
|
boolean |
isMultipleWrapEnabled()
Tells if multiple wrapping with this content decorator is enabled.
|
protected boolean |
isSourceChildInherited(javax.jcr.Node node)
Decides if a specific child node of one of the source should be inherited.
|
protected javax.jcr.NodeIterator |
sortInheritedNodes(javax.jcr.NodeIterator destinationChildren,
List<javax.jcr.NodeIterator> sourceChildren)
Sorts the inherited nodes and provides a
NodeIterator representing that order. |
javax.jcr.Node |
wrapNode(javax.jcr.Node node) |
evaluateNode, evaluateProperty, isDecorating, wrapNodeIterator, wrapProperty, wrapPropertyIterator, wrapSession, wrapVersion, wrapVersionHistory, wrapVersionIterator, wrapVersionManager, wrapWorkspace
public InheritanceContentDecorator(javax.jcr.Node destination) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public javax.jcr.Node wrapNode(javax.jcr.Node node)
wrapNode
in interface ContentDecorator
wrapNode
in class AbstractContentDecorator
public javax.jcr.Node getDestination()
public void addSource(javax.jcr.Node source)
protected boolean inheritsNodes(javax.jcr.Node node) throws javax.jcr.RepositoryException
node
- the destination node or a source nodejavax.jcr.RepositoryException
protected boolean inheritsProperties(javax.jcr.Node node) throws javax.jcr.RepositoryException
node
- the destination node or a source nodejavax.jcr.RepositoryException
protected boolean isSourceChildInherited(javax.jcr.Node node) throws javax.jcr.RepositoryException
node
- a child of one of the source nodesjavax.jcr.RepositoryException
protected javax.jcr.NodeIterator sortInheritedNodes(javax.jcr.NodeIterator destinationChildren, List<javax.jcr.NodeIterator> sourceChildren) throws javax.jcr.RepositoryException
NodeIterator
representing that order. By default orders nodes
from the top-most source first and nodes from the destination last.destinationChildren
- children of the destination nodesourceChildren
- children of each of the source nodes in bottom-up orderjavax.jcr.RepositoryException
protected javax.jcr.PropertyIterator combinePropertyIterators(javax.jcr.PropertyIterator destinationProperties, List<javax.jcr.PropertyIterator> sourceProperties) throws javax.jcr.RepositoryException
PropertyIterator
. By default properties in the
destination node overrides properties from source nodes. Properties on source node have preference in a bottom to
top order.destinationProperties
- properties of the destination nodesourceProperties
- properties of the source nodes in bottom-up orderjavax.jcr.RepositoryException
public boolean isMultipleWrapEnabled()
ContentDecorator
isMultipleWrapEnabled
in interface ContentDecorator
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.