Content
. Declared deprecated since 5.5.4.@Deprecated public abstract class ContentWrapper extends AbstractContent
The following methods you might want to override:
getChildren(info.magnolia.cms.core.Content.ContentFilter, String, java.util.Comparator)
hasContent(String)
getContent(String)
AbstractContent.getNodeData(String)
getNodeDataCollection(String)
wrap(Content)
wrap(NodeData)
AbstractContent
. If not you have to override the following methods:
Content.ContentFilter
Constructor and Description |
---|
ContentWrapper()
Deprecated.
since 4.3 - use
ContentWrapper(info.magnolia.cms.core.Content) instead. |
ContentWrapper(Content wrappedContent)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addMixin(String type)
Deprecated.
add specified mixin type if allowed.
|
javax.jcr.version.Version |
addVersion()
Deprecated.
add version leaving the node checked out.
|
javax.jcr.version.Version |
addVersion(Rule rule)
Deprecated.
add version leaving the node checked out.
|
Content |
createContent(String name,
String contentType)
Deprecated.
Creates a Content node under the current node with the specified name.
|
void |
delete()
Deprecated.
Remove this path.
|
void |
deleteNodeData(String name)
Deprecated.
Delete NodeData with the specified name.
|
javax.jcr.version.VersionIterator |
getAllVersions()
Deprecated.
|
Content |
getAncestor(int level)
Deprecated.
get absolute parent object starting from the root node.
|
Collection<Content> |
getAncestors()
Deprecated.
Convenience method for taglib.
|
ContentVersion |
getBaseVersion()
Deprecated.
get the current base version of this node.
|
Content |
getChildByName(String namePattern)
Deprecated.
since 4.3, either use
getContent(String) or AbstractContent.getChildren(String) |
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.
|
String |
getHandle()
Deprecated.
get a handle representing path relative to the content repository.
|
HierarchyManager |
getHierarchyManager()
Deprecated.
Get hierarchy manager if previously set for this object.
|
int |
getIndex()
Deprecated.
This method returns the index of this node within the ordered set of its same-name sibling
nodes.
|
ItemType |
getItemType()
Deprecated.
Get the magnolia ItemType.
|
javax.jcr.Node |
getJCRNode()
Deprecated.
utility method to get Node object used to create current content object.
|
int |
getLevel()
Deprecated.
get node level from the ROOT node.
|
javax.jcr.lock.Lock |
getLock()
Deprecated.
Returns the Lock object that applies to this node.
|
MetaData |
getMetaData()
Deprecated.
Returns the meta data of the current node.
|
javax.jcr.nodetype.NodeType[] |
getMixinNodeTypes()
Deprecated.
Returns an array of NodeType objects representing the mixin node types assigned to this node.
|
String |
getName()
Deprecated.
get node name.
|
Collection<NodeData> |
getNodeDataCollection(String namePattern)
Deprecated.
Gets all node datas matching the given pattern.
|
javax.jcr.nodetype.NodeType |
getNodeType()
Deprecated.
returns primary node type definition of the associated Node of this object.
|
String |
getNodeTypeName()
Deprecated.
returns primary node type name of the associated Node of this object.
|
Content |
getParent()
Deprecated.
get parent content object.
|
String |
getTemplate()
Deprecated.
Returns the template name which is assigned to this content.
|
String |
getTitle()
Deprecated.
|
String |
getUUID()
Deprecated.
UUID of the node referenced by this object.
|
ContentVersion |
getVersionedContent(String versionName)
Deprecated.
get content view over the jcr version object.
|
ContentVersion |
getVersionedContent(javax.jcr.version.Version version)
Deprecated.
get content view over the jcr version object.
|
javax.jcr.version.VersionHistory |
getVersionHistory()
Deprecated.
|
javax.jcr.Workspace |
getWorkspace()
Deprecated.
get workspace to which this node attached to.
|
Content |
getWrappedContent()
Deprecated.
|
boolean |
hasContent(String name)
Deprecated.
|
boolean |
hasMetaData()
Deprecated.
checks if this node has a sub node with name MetaData.
|
boolean |
hasMixin(String mixinName)
Deprecated.
Checks whether or not given mixin is assigned to a type.
|
boolean |
holdsLock()
Deprecated.
Returns true if this node holds a lock; otherwise returns false.
|
boolean |
isGranted(long permissions)
Deprecated.
Checks for the allowed access rights.
|
boolean |
isLocked()
Deprecated.
Returns true if this node is locked either as a result of a lock held by this node or by a
deep lock on a node above this node; otherwise returns false.
|
boolean |
isModified()
Deprecated.
Returns
true if this Item has been saved but has subsequently been
modified through the current session and therefore the state of this item as recorded in the
session differs from the state of this item as saved. |
boolean |
isNodeData(String path)
Deprecated.
checks if the requested resource is an NodeData (Property).
|
boolean |
isNodeType(String type)
Deprecated.
evaluate primary node type of the associated Node of this object.
|
javax.jcr.lock.Lock |
lock(boolean isDeep,
boolean isSessionScoped)
Deprecated.
places a lock on this object.
|
javax.jcr.lock.Lock |
lock(boolean isDeep,
boolean isSessionScoped,
long yieldFor)
Deprecated.
places a lock on this object.
|
NodeData |
newNodeDataInstance(String name,
int type,
boolean createIfNotExisting)
Deprecated.
As defined in
Content.getNodeData(String) this method always returns a node data object. |
void |
orderBefore(String srcName,
String beforeName)
Deprecated.
move current node to the specified location above the named
beforename . |
void |
refresh(boolean keepChanges)
Deprecated.
If keepChanges is false, this method discards all pending changes recorded in this session.
|
void |
removeMixin(String type)
Deprecated.
Removes the specified mixin node type from this node.
|
void |
removeVersionHistory()
Deprecated.
removes all versions of this node and associated version graph.
|
void |
restore(String versionName,
boolean removeExisting)
Deprecated.
Restores this node to the state defined by the version with the specified versionName.
|
void |
restore(javax.jcr.version.Version version,
boolean removeExisting)
Deprecated.
Restores this node to the state defined by the specified version.
|
void |
restore(javax.jcr.version.Version version,
String relPath,
boolean removeExisting)
Deprecated.
Restores the specified version to relPath, relative to this node.
|
void |
restoreByLabel(String versionLabel,
boolean removeExisting)
Deprecated.
Restores this node to the state recorded in the version specified by versionLabel.
|
void |
save()
Deprecated.
Persists all changes to the repository if validation succeeds.
|
void |
setWrappedContent(Content wrappedContent)
Deprecated.
since 4.3 - use
ContentWrapper(info.magnolia.cms.core.Content) instead. |
String |
toString()
Deprecated.
|
void |
unlock()
Deprecated.
Removes the lock on this node.
|
void |
updateMetaData()
Deprecated.
You could call this method anytime to update working page properties - Modification date &
Author ID.
|
protected Content |
wrap(Content node)
Deprecated.
Override if a wrapper wants to wrap returned content objects.
|
protected NodeData |
wrap(NodeData nodeData)
Deprecated.
Override if a wrapper wants to wrap returned node data objects.
|
protected Collection<Content> |
wrapContentNodes(Collection<Content> collection)
Deprecated.
Override if a wrapper wants to wrap returned collections as well (by getChildren(..), ...
|
protected Collection<NodeData> |
wrapNodeDatas(Collection<NodeData> collection)
Deprecated.
Override if a wrapper wants to wrap returned collections as well (by getChildren(..), ...
|
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
clone, getAccessManager, setAccessManager
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAccessManager
@Deprecated public ContentWrapper()
ContentWrapper(info.magnolia.cms.core.Content)
instead.public ContentWrapper(Content wrappedContent)
public Content getWrappedContent()
@Deprecated public void setWrappedContent(Content wrappedContent)
ContentWrapper(info.magnolia.cms.core.Content)
instead.protected Content wrap(Content node)
protected NodeData wrap(NodeData nodeData)
protected Collection<Content> wrapContentNodes(Collection<Content> collection)
wrap(Content)
protected Collection<NodeData> wrapNodeDatas(Collection<NodeData> collection)
wrap(Content)
public String toString()
toString
in class AbstractContent
public Collection<Content> getChildren(Content.ContentFilter filter, String namePattern, Comparator<Content> orderCriteria)
getChildren
in class AbstractContent
namePattern
- ignored if null.public NodeData newNodeDataInstance(String name, int type, boolean createIfNotExisting) throws AccessDeniedException, javax.jcr.RepositoryException
AbstractContent
Content.getNodeData(String)
this method always returns a node data object. If the type is PropertyType.UNDEFINED
the implementation should check if the node data exists and determine the type to use.newNodeDataInstance
in class AbstractContent
createIfNotExisting
- if false an empty non-mutable node data will be returned if the node data doesn't exist otherwise a mutable nodedata object is returned (depending on the type)AccessDeniedException
javax.jcr.RepositoryException
public void addMixin(String type) throws javax.jcr.RepositoryException
Content
type
- mixin type to be addedjavax.jcr.RepositoryException
- if an error occurspublic javax.jcr.version.Version addVersion() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic javax.jcr.version.Version addVersion(Rule rule) throws javax.jcr.RepositoryException
Content
rule
- to be used to collect contentjavax.jcr.RepositoryException
- if an error occursRule
public Content createContent(String name, String contentType) throws javax.jcr.RepositoryException
Content
name
- of the node to be created as Content
contentType
- JCR node type as configuredContent
javax.jcr.RepositoryException
- if an error occursAccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationpublic void delete() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic void deleteNodeData(String name) throws javax.jcr.RepositoryException
Content
deleteNodeData
in interface Content
deleteNodeData
in class AbstractContent
javax.jcr.RepositoryException
- if an error occurspublic javax.jcr.version.VersionIterator getAllVersions() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if an error occurspublic Content getAncestor(int level) throws javax.jcr.RepositoryException
Content
level
- level at which the requested node exist, relative to the ROOT nodeAccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationjavax.jcr.RepositoryException
- if an error occurspublic Collection<Content> getAncestors() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic ContentVersion getBaseVersion() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
@Deprecated public Content getChildByName(String namePattern)
getContent(String)
or AbstractContent.getChildren(String)
Content
getChildByName
in interface Content
getChildByName
in class AbstractContent
namePattern
- child node namenull
if not foundpublic Content getContent(String name) throws javax.jcr.RepositoryException
Content
name
- of the node acting as Content
javax.jcr.RepositoryException
- if an error occursAccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationpublic String getHandle()
Content
public int getIndex() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic ItemType getItemType() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
public javax.jcr.Node getJCRNode()
Content
public int getLevel() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic javax.jcr.lock.Lock getLock() throws javax.jcr.RepositoryException
Content
javax.jcr.lock.LockException
- If no lock applies to this node, a LockException is thrown.javax.jcr.RepositoryException
- if an error occurspublic MetaData getMetaData()
Content
Node
public javax.jcr.nodetype.NodeType[] getMixinNodeTypes() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic String getName()
Content
Node
public Collection<NodeData> getNodeDataCollection(String namePattern)
Content
public javax.jcr.nodetype.NodeType getNodeType() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic String getNodeTypeName() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic Content getParent() throws javax.jcr.RepositoryException
Content
AccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationjavax.jcr.RepositoryException
- if an error occurspublic String getTemplate()
Content
getTemplate
in interface Content
getTemplate
in class AbstractContent
public String getTitle()
getTitle
in interface Content
getTitle
in class AbstractContent
public String getUUID()
Content
public ContentVersion getVersionedContent(String versionName) throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
ContentVersion
public ContentVersion getVersionedContent(javax.jcr.version.Version version) throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
ContentVersion
public javax.jcr.version.VersionHistory getVersionHistory() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if an error occurspublic javax.jcr.Workspace getWorkspace() throws javax.jcr.RepositoryException
Content
getWorkspace
in interface Content
getWorkspace
in class AbstractContent
javax.jcr.RepositoryException
- if unable to get this node sessionpublic boolean hasContent(String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if an error occurspublic boolean hasMetaData()
Content
public boolean holdsLock() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic boolean isGranted(long permissions)
Content
isGranted
in interface Content
isGranted
in class AbstractContent
permissions
- as defined in javax.jcr.Permissiontrue
if the current user has specified access on this node.public boolean isLocked() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic boolean isModified()
Content
true
if this Item
has been saved but has subsequently been
modified through the current session and therefore the state of this item as recorded in the
session differs from the state of this item as saved. Within a transaction,
isModified
on an Item
may return false
(because the
Item
has been saved since the modification) even if the modification in question
is not in persistent storage (because the transaction has not yet been committed).
Note that in level 1 (that is, read-only) implementations, this method will always return
false
.true
if this item is modified; false
otherwise.public boolean isNodeData(String path) throws javax.jcr.RepositoryException
Content
isNodeData
in interface Content
isNodeData
in class AbstractContent
path
- of the requested NodeDataAccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationjavax.jcr.RepositoryException
- if an error occurspublic boolean isNodeType(String type)
Content
public javax.jcr.lock.Lock lock(boolean isDeep, boolean isSessionScoped, long yieldFor) throws javax.jcr.RepositoryException
Content
isDeep
- if true this lock will apply to this node and all its descendants; if false, it
applies only to this node.isSessionScoped
- if true, this lock expires with the current session; if false it
expires when explicitly or automatically unlocked for some other reason.yieldFor
- number of milliseconds for which this method will try to get a lockjavax.jcr.lock.LockException
- if this node is already locked or isDeep
is true and a
descendant node of this node already holds a lock.javax.jcr.RepositoryException
- if an error occursNode.lock(boolean, boolean)
public javax.jcr.lock.Lock lock(boolean isDeep, boolean isSessionScoped) throws javax.jcr.RepositoryException
Content
isDeep
- if true this lock will apply to this node and all its descendants; if false, it
applies only to this node.isSessionScoped
- if true, this lock expires with the current session; if false it
expires when explicitly or automatically unlocked for some other reason.javax.jcr.lock.LockException
- if this node is already locked or isDeep
is true and a
descendant node of this node already holds a lock.javax.jcr.RepositoryException
- if an error occursNode.lock(boolean, boolean)
public void orderBefore(String srcName, String beforeName) throws javax.jcr.RepositoryException
Content
beforename
.srcName
- where current node has to be movedbeforeName
- name of the node before the current node has to be placedjavax.jcr.RepositoryException
- if an error occurspublic void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occursItem.refresh(boolean)
public void removeMixin(String type) throws javax.jcr.RepositoryException
Content
type
- , mixin type to be removedjavax.jcr.RepositoryException
- if an error occurspublic void removeVersionHistory() throws javax.jcr.RepositoryException
Content
AccessDeniedException
- If not allowed to do write operations on this nodejavax.jcr.RepositoryException
- if unable to remove versions from version storepublic void restore(String versionName, boolean removeExisting) throws javax.jcr.RepositoryException
Content
javax.jcr.version.VersionException
- if the specified versionName
does not exist in this
node's version historyjavax.jcr.RepositoryException
- if an error occurspublic void restore(javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.RepositoryException
Content
javax.jcr.version.VersionException
- if the specified version
is not part of this node's
version historyjavax.jcr.RepositoryException
- if an error occurspublic void restore(javax.jcr.version.Version version, String relPath, boolean removeExisting) throws javax.jcr.RepositoryException
Content
javax.jcr.version.VersionException
- if the specified version
is not part of this node's
version historyjavax.jcr.RepositoryException
- if an error occurspublic void restoreByLabel(String versionLabel, boolean removeExisting) throws javax.jcr.RepositoryException
Content
javax.jcr.version.VersionException
- if the specified versionLabel
does not exist in this
node's version historyjavax.jcr.RepositoryException
- if an error occurspublic void save() throws javax.jcr.RepositoryException
Content
javax.jcr.RepositoryException
- if an error occurspublic void unlock() throws javax.jcr.RepositoryException
Content
javax.jcr.lock.LockException
- if either does not currently hold a lock, or holds a lock for which
this Session does not have the correct lock tokenjavax.jcr.RepositoryException
- if an error occurspublic void updateMetaData() throws javax.jcr.RepositoryException
Content
updateMetaData
in interface Content
updateMetaData
in class AbstractContent
AccessDeniedException
- if the current session does not have sufficient access rights
to complete the operationjavax.jcr.RepositoryException
- if an error occurspublic HierarchyManager getHierarchyManager()
ContentHandler
getHierarchyManager
in interface Content
getHierarchyManager
in class ContentHandler
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.