|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.core.ContentHandler info.magnolia.cms.core.AbstractContent info.magnolia.cms.util.ContentWrapper info.magnolia.cms.util.ExtendingContentWrapper
ExtendingNodeWrapper
instead.
public class ExtendingContentWrapper
This wrapper allows extending other nodes (mainly useful to extend configurations). A content node can define a nodeData with the name 'extends'. Its value is either an absolute or relative path. The merge is then performed as follows:
a class supporting content inheritance.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface info.magnolia.cms.core.Content |
---|
Content.ContentFilter |
Field Summary | |
---|---|
protected static String |
EXTENDING_NODE_DATA
Deprecated. |
protected static String |
EXTENDING_NODE_DATA_OVERRIDE
Deprecated. |
Constructor Summary | |
---|---|
|
ExtendingContentWrapper(Content wrappedContent)
Deprecated. |
protected |
ExtendingContentWrapper(Content wrappedContent,
Content extendedContent)
Deprecated. Does not support the extends nodedata but chains the two nodes directly. |
Method Summary | |
---|---|
Collection<Content> |
getChildren(Content.ContentFilter filter,
String namePattern,
Comparator<Content> orderCriteria)
Deprecated. |
Content |
getContent(String name)
Deprecated. Gets the Content node of the current node with the specified name. |
NodeData |
getNodeData(String name)
Deprecated. Returns a NodeData object. |
Collection<NodeData> |
getNodeDataCollection()
Deprecated. Gets all properties bind in NodeData object excluding JCR system properties. |
Content |
getWrappedContent()
Deprecated. |
boolean |
hasContent(String name)
Deprecated. |
boolean |
hasNodeData(String name)
Deprecated. Delegates to NodeData.isExist() . |
boolean |
isExtending()
Deprecated. |
protected Content |
wrap(Content node)
Deprecated. Override if a wrapper wants to wrap returned content objects. |
Methods inherited from class info.magnolia.cms.util.ContentWrapper |
---|
addMixin, addVersion, addVersion, createContent, delete, deleteNodeData, getAllVersions, getAncestor, getAncestors, getBaseVersion, getChildByName, getHandle, getHierarchyManager, getIndex, getItemType, getJCRNode, getLevel, getLock, getMetaData, getMixinNodeTypes, getName, getNodeDataCollection, getNodeType, getNodeTypeName, getParent, getTemplate, getTitle, getUUID, getVersionedContent, getVersionedContent, getVersionHistory, getWorkspace, hasMetaData, hasMixin, holdsLock, isGranted, isLocked, isModified, isNodeData, isNodeType, lock, lock, newNodeDataInstance, orderBefore, refresh, removeMixin, removeVersionHistory, restore, restore, restore, restoreByLabel, save, setWrappedContent, toString, unlock, updateMetaData, wrap, wrapContentNodes, wrapNodeDatas |
Methods inherited from class info.magnolia.cms.core.AbstractContent |
---|
createContent, createContent, createNodeData, createNodeData, createNodeData, createNodeData, createNodeData, delete, getBinaryNodeDatas, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, hasChildren, hasChildren, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData |
Methods inherited from class info.magnolia.cms.core.ContentHandler |
---|
clone, getAccessManager, setAccessManager |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface info.magnolia.cms.core.Content |
---|
getAccessManager |
Field Detail |
---|
protected static final String EXTENDING_NODE_DATA
protected static final String EXTENDING_NODE_DATA_OVERRIDE
Constructor Detail |
---|
public ExtendingContentWrapper(Content wrappedContent)
protected ExtendingContentWrapper(Content wrappedContent, Content extendedContent)
Method Detail |
---|
public boolean isExtending()
public Content getWrappedContent()
getWrappedContent
in class ContentWrapper
public boolean hasContent(String name) throws javax.jcr.RepositoryException
hasContent
in interface Content
hasContent
in class ContentWrapper
javax.jcr.RepositoryException
- if an error occurspublic Content getContent(String name) throws javax.jcr.RepositoryException
Content
getContent
in interface Content
getContent
in class ContentWrapper
name
- of the node acting as Content
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
- if an error occurs
AccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationpublic Collection<Content> getChildren(Content.ContentFilter filter, String namePattern, Comparator<Content> orderCriteria)
getChildren
in class ContentWrapper
namePattern
- ignored if null.public NodeData getNodeData(String name)
AbstractContent
NodeData
object. If the node data does not exist (respectively if it has no
value) an empty representation is returned whose NodeData.isExist()
will return
false.
Delegates to AbstractContent.newNodeDataInstance(String, int, boolean)
by setting the type to PropertyType.UNDEFINED. A subclass has to handle this by trying to determine the type if the node data exists. The reason for this is that implementations want to instantiate different node data classes per type
getNodeData
in interface Content
getNodeData
in class AbstractContent
NodeData
objectpublic boolean hasNodeData(String name) throws javax.jcr.RepositoryException
AbstractContent
NodeData.isExist()
.
hasNodeData
in interface Content
hasNodeData
in class AbstractContent
javax.jcr.RepositoryException
- if an error occurspublic Collection<NodeData> getNodeDataCollection()
Content
getNodeDataCollection
in interface Content
getNodeDataCollection
in class AbstractContent
protected Content wrap(Content node)
ContentWrapper
wrap
in class ContentWrapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |