info.magnolia.cms.util
Class LazyContentWrapper

java.lang.Object
  extended by info.magnolia.cms.core.ContentHandler
      extended by info.magnolia.cms.core.AbstractContent
          extended by info.magnolia.cms.util.ContentWrapper
              extended by info.magnolia.cms.util.LazyContentWrapper
All Implemented Interfaces:
Content, Serializable, Cloneable
Direct Known Subclasses:
SystemContentWrapper

public class LazyContentWrapper
extends ContentWrapper
implements Serializable

Stores an uuid and will re-fetch the node in getWrappedContent() if the session is closed.

Version:
$Id$
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.cms.core.Content
Content.ContentFilter
 
Constructor Summary
LazyContentWrapper(Content node)
           
LazyContentWrapper(String repository, String uuid)
           
 
Method Summary
 HierarchyManager getHierarchyManager()
          Get hierarchy manager if previously set for this object.
protected  String getRepository()
           
protected  String getUuid()
           
 Content getWrappedContent()
           
protected  void setRepository(String repository)
           
protected  void setUuid(String uuid)
           
 NodeData wrap(NodeData nodeData)
          Override if a wrapper wants to wrap returned node data objects.
 
Methods inherited from class info.magnolia.cms.util.ContentWrapper
addMixin, addVersion, addVersion, createContent, delete, deleteNodeData, getAllVersions, getAncestor, getAncestors, getBaseVersion, getChildByName, getChildren, getContent, getHandle, getIndex, getItemType, getJCRNode, getLevel, getLock, getMetaData, getMixinNodeTypes, getName, getNodeDataCollection, getNodeType, getNodeTypeName, getParent, getTemplate, getTitle, getUUID, getVersionedContent, getVersionedContent, getVersionHistory, getWorkspace, hasContent, 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, getNodeData, getNodeDataCollection, hasChildren, hasChildren, hasNodeData, 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
 

Constructor Detail

LazyContentWrapper

public LazyContentWrapper(String repository,
                          String uuid)

LazyContentWrapper

public LazyContentWrapper(Content node)
Method Detail

getWrappedContent

public Content getWrappedContent()
Overrides:
getWrappedContent in class ContentWrapper

getHierarchyManager

public HierarchyManager getHierarchyManager()
Description copied from class: ContentHandler
Get hierarchy manager if previously set for this object.

Specified by:
getHierarchyManager in interface Content
Overrides:
getHierarchyManager in class ContentWrapper
Returns:
HierarchyManager

wrap

public NodeData wrap(NodeData nodeData)
Description copied from class: ContentWrapper
Override if a wrapper wants to wrap returned node data objects. The default implementation returns the original value.

Overrides:
wrap in class ContentWrapper

setUuid

protected void setUuid(String uuid)

getUuid

protected String getUuid()

setRepository

protected void setRepository(String repository)

getRepository

protected String getRepository()


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.