info.magnolia.cms.core
Interface Content

All Superinterfaces:
Cloneable
All Known Implementing Classes:
AbstractContent, ContentVersion, ContentWrapper, DefaultContent, ExtendingContentWrapper, HTMLEncodingContentWrapper, I18nContentWrapper, InheritanceContentWrapper, LazyContentWrapper, NodeMapWrapper, SetNode.NodeMapWrapper, SystemContentWrapper

Deprecated. since 4.5 - use jcr.Node instead.

@Deprecated
public interface Content
extends Cloneable

Represents a piece of content (node) which has nodedatas (properties) containing the values and which can have sub contents. This is is very similar to the JCR Node interface.

Version:
$Id$

Nested Class Summary
static interface Content.ContentFilter
          Deprecated. since 4.5 - use Predicate instead.
 
Method Summary
 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)
          Deprecated. Creates a Content node under the current node with the specified name.
 Content createContent(String name, ItemType contentType)
          Deprecated. Creates a Content node under the current node with the specified name.
 Content createContent(String name, String contentType)
          Deprecated. Creates a Content node under the current node with the specified name.
 NodeData createNodeData(String name)
          Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.
 NodeData createNodeData(String name, int type)
          Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.
 NodeData createNodeData(String name, Object obj)
          Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.
 NodeData createNodeData(String name, javax.jcr.Value value)
          Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Value) instead.
 NodeData createNodeData(String name, javax.jcr.Value[] value)
          Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Value[]) instead.
 void delete()
          Deprecated. Remove this path.
 void delete(String path)
          Deprecated. Remove specified path.
 void deleteNodeData(String name)
          Deprecated. Delete NodeData with the specified name.
 AccessManager getAccessManager()
          Deprecated. since 4.0 - use getHierarchyManager instead
 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 getChildren(String)
 Collection<Content> getChildren()
          Deprecated. Gets a Collection containing all child nodes of the same NodeType as "this" object.
 Collection<Content> getChildren(Content.ContentFilter filter)
          Deprecated. Get a collection containing child nodes which satisfies the given filter.
 Collection<Content> getChildren(Content.ContentFilter filter, Comparator<Content> orderCriteria)
          Deprecated. Get a collection containing child nodes which satisfies the given filter.
 Collection<Content> getChildren(ItemType contentType)
          Deprecated. Get collection of specified content type.
 Collection<Content> getChildren(String contentType)
          Deprecated. Get collection of specified content type and its subtypes.
 Collection<Content> getChildren(String contentType, String namePattern)
          Deprecated. Get collection of specified content type.
 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.  
 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.
 NodeData getNodeData(String name)
          Deprecated. Returns a NodeData object.
 Collection<NodeData> getNodeDataCollection()
          Deprecated. Gets all properties bind in NodeData object excluding JCR system properties.
 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.
 boolean hasChildren()
          Deprecated.  
 boolean hasChildren(String contentType)
          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 hasNodeData(String name)
          Deprecated.  
 boolean holdsLock()
          Deprecated. Returns true if this node holds a lock; otherwise returns false.
 boolean isGranted(long permissions)
          Deprecated. since 4.5. Use PermissionUtil#isGranted(String, String, long) or PermissionUtil#isGranted(javax.jcr.Session, String, String) instead. To convert old style permissions to the new ones, please see PermissionUtil#convertPermissions(long).
 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.
 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.
 NodeData setNodeData(String name, boolean value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, Calendar value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, Content value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, double value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, InputStream value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, long value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, Object value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, String value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, javax.jcr.Value value)
          Deprecated. Sets the node data.
 NodeData setNodeData(String name, javax.jcr.Value[] value)
          Deprecated. Sets the node data.
 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.
 

Method Detail

getContent

Content getContent(String name)
                   throws javax.jcr.PathNotFoundException,
                          javax.jcr.RepositoryException,
                          AccessDeniedException
Deprecated. 
Gets the Content node of the current node with the specified name.

Parameters:
name - of the node acting as Content
Returns:
Content
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation

createContent

Content createContent(String name)
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
Deprecated. 
Creates a Content node under the current node with the specified name. The default node type ItemType.CONTENT will be use as the contents primary type.

Parameters:
name - of the node to be created as Content
Returns:
newly created Content
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation

createContent

Content createContent(String name,
                      String contentType)
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
Deprecated. 
Creates a Content node under the current node with the specified name.

Parameters:
name - of the node to be created as Content
contentType - JCR node type as configured
Returns:
newly created Content
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation

createContent

Content createContent(String name,
                      ItemType contentType)
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
Deprecated. 
Creates a Content node under the current node with the specified name.

Parameters:
name - of the node to be created as Content
contentType - ItemType
Returns:
newly created Content
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation

getTemplate

String getTemplate()
Deprecated. 
Returns the template name which is assigned to this content.


getTitle

String getTitle()
Deprecated. 
Returns:
String, title

getMetaData

MetaData getMetaData()
Deprecated. 
Returns the meta data of the current node.

Returns:
MetaData meta information of the content Node

getNodeData

NodeData getNodeData(String name)
Deprecated. 
Returns a 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.

Returns:
NodeData requested NodeData object

getName

String getName()
Deprecated. 
get node name.

Returns:
String name of the current Node

createNodeData

@Deprecated
NodeData createNodeData(String name)
                        throws javax.jcr.PathNotFoundException,
                               javax.jcr.RepositoryException,
                               AccessDeniedException
Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.

Creates a node data of type STRING with an empty String as default value.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

createNodeData

@Deprecated
NodeData createNodeData(String name,
                                   int type)
                        throws javax.jcr.PathNotFoundException,
                               javax.jcr.RepositoryException,
                               AccessDeniedException
Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.

Creates a node data of type with an default value set. If the no default value can be set (for BINARY, REFERENCE type) the returned node data will be empty and per definition not yet exist.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

createNodeData

@Deprecated
NodeData createNodeData(String name,
                                   javax.jcr.Value value)
                        throws javax.jcr.PathNotFoundException,
                               javax.jcr.RepositoryException,
                               AccessDeniedException
Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Value) instead.

Creates a node data setting the value.

Throws:
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

createNodeData

@Deprecated
NodeData createNodeData(String name,
                                   javax.jcr.Value[] value)
                        throws javax.jcr.PathNotFoundException,
                               javax.jcr.RepositoryException,
                               AccessDeniedException
Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Value[]) instead.

Create a multi value node data.

Throws:
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

createNodeData

@Deprecated
NodeData createNodeData(String name,
                                   Object obj)
                        throws javax.jcr.RepositoryException
Deprecated. since 4.3, as JCR only supports set or remove operations for properties we recommend to use setNodeData(String, Object) instead.

Creates a property and set its value immediately, according to the type of the passed instance, hiding the complexity of using JCR's ValueFactory and providing a sensible default behavior.

Throws:
javax.jcr.RepositoryException

setNodeData

NodeData setNodeData(String name,
                     javax.jcr.Value value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null is not allowed

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     javax.jcr.Value[] value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null is not allowed.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     String value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null is not allowed.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     long value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null is not allowed.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     InputStream value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null is not allowed.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     double value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null will remove the node data.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     boolean value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null will remove the node data.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     Calendar value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null will remove the node data.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     Content value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null will remove the node data.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

setNodeData

NodeData setNodeData(String name,
                     Object value)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
Sets the node data. If the node data does not yet exist the node data is created. Setting null will remove the node data.
The type of the node data will be determined by the type of the passed value

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

deleteNodeData

void deleteNodeData(String name)
                    throws javax.jcr.PathNotFoundException,
                           javax.jcr.RepositoryException
Deprecated. 
Delete NodeData with the specified name.

Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs

updateMetaData

void updateMetaData()
                    throws javax.jcr.RepositoryException,
                           AccessDeniedException
Deprecated. 
You could call this method anytime to update working page properties - Modification date & Author ID.

Throws:
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.RepositoryException - if an error occurs

getChildren

Collection<Content> getChildren()
Deprecated. 
Gets a Collection containing all child nodes of the same NodeType as "this" object.

Returns:
Collection of content objects

getChildren

Collection<Content> getChildren(Content.ContentFilter filter)
Deprecated. 
Get a collection containing child nodes which satisfies the given filter.

Parameters:
filter -
Returns:
Collection of content objects or empty collection when no children are found.

getChildren

Collection<Content> getChildren(Content.ContentFilter filter,
                                Comparator<Content> orderCriteria)
Deprecated. 
Get a collection containing child nodes which satisfies the given filter. The returned collection is ordered according to the passed in criteria.

Parameters:
filter - filter for the child nodes
orderCriteria - ordering for the selected child nodes; if null than no particular order of the child nodes
Returns:
Collection of content objects or empty collection when no children are found.

getChildren

Collection<Content> getChildren(String contentType)
Deprecated. 
Get collection of specified content type and its subtypes.

Parameters:
contentType - JCR node type as configured
Returns:
Collection of content nodes

getChildren

Collection<Content> getChildren(ItemType contentType)
Deprecated. 
Get collection of specified content type.

Parameters:
contentType - ItemType
Returns:
Collection of content nodes

getChildren

Collection<Content> getChildren(String contentType,
                                String namePattern)
Deprecated. 
Get collection of specified content type.

Parameters:
contentType - JCR node type as configured
namePattern -
Returns:
Collection of content nodes

getChildByName

@Deprecated
Content getChildByName(String namePattern)
Deprecated. since 4.3, either use getContent(String) or getChildren(String)

Returns the first child with the given name, any node type.

Parameters:
namePattern - child node name
Returns:
first found node with the given name or null if not found

getNodeDataCollection

Collection<NodeData> getNodeDataCollection()
Deprecated. 
Gets all properties bind in NodeData object excluding JCR system properties.


getNodeDataCollection

Collection<NodeData> getNodeDataCollection(String namePattern)
Deprecated. 
Gets all node datas matching the given pattern. If no pattern is given (null), gets all node datas.


hasChildren

boolean hasChildren()
Deprecated. 
Returns:
Boolean, if sub node(s) exists

hasChildren

boolean hasChildren(String contentType)
Deprecated. 
Parameters:
contentType - JCR node type as configured
Returns:
Boolean, if sub collectionType exists

hasContent

boolean hasContent(String name)
                   throws javax.jcr.RepositoryException
Deprecated. 
Parameters:
name -
Throws:
javax.jcr.RepositoryException - if an error occurs

hasNodeData

boolean hasNodeData(String name)
                    throws javax.jcr.RepositoryException
Deprecated. 
Parameters:
name -
Throws:
javax.jcr.RepositoryException - if an error occurs

getHandle

String getHandle()
Deprecated. 
get a handle representing path relative to the content repository.

Returns:
String representing path (handle) of the content

getParent

Content getParent()
                  throws javax.jcr.PathNotFoundException,
                         javax.jcr.RepositoryException,
                         AccessDeniedException
Deprecated. 
get parent content object.

Returns:
Content representing parent node
Throws:
javax.jcr.PathNotFoundException
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.RepositoryException - if an error occurs

getAncestor

Content getAncestor(int level)
                    throws javax.jcr.PathNotFoundException,
                           javax.jcr.RepositoryException,
                           AccessDeniedException
Deprecated. 
get absolute parent object starting from the root node.

Parameters:
level - level at which the requested node exist, relative to the ROOT node
Returns:
Content representing parent node
Throws:
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.RepositoryException - if an error occurs
javax.jcr.PathNotFoundException

getAncestors

Collection<Content> getAncestors()
                                 throws javax.jcr.PathNotFoundException,
                                        javax.jcr.RepositoryException
Deprecated. 
Convenience method for taglib.

Returns:
Content representing node on level 0
Throws:
javax.jcr.RepositoryException - if an error occurs
javax.jcr.PathNotFoundException

getLevel

int getLevel()
             throws javax.jcr.PathNotFoundException,
                    javax.jcr.RepositoryException
Deprecated. 
get node level from the ROOT node.

Returns:
level at which current node exist, relative to the ROOT node
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException - if an error occurs

orderBefore

void orderBefore(String srcName,
                 String beforeName)
                 throws javax.jcr.RepositoryException
Deprecated. 
move current node to the specified location above the named beforename.

Parameters:
srcName - where current node has to be moved
beforeName - name of the node before the current node has to be placed
Throws:
javax.jcr.RepositoryException - if an error occurs

getIndex

int getIndex()
             throws javax.jcr.RepositoryException
Deprecated. 
This method returns the index of this node within the ordered set of its same-name sibling nodes. This index is the one used to address same-name siblings using the square-bracket notation, e.g., /a[3]/b[4]. Note that the index always starts at 1 (not 0), for compatibility with XPath. As a result, for nodes that do not have same-name-siblings, this method will always return 1.

Returns:
The index of this node within the ordered set of its same-name sibling nodes.
Throws:
javax.jcr.RepositoryException - if an error occurs

getJCRNode

javax.jcr.Node getJCRNode()
Deprecated. 
utility method to get Node object used to create current content object.

Returns:
Node

isNodeType

boolean isNodeType(String type)
Deprecated. 
evaluate primary node type of the associated Node of this object.

Parameters:
type -

getNodeType

javax.jcr.nodetype.NodeType getNodeType()
                                        throws javax.jcr.RepositoryException
Deprecated. 
returns primary node type definition of the associated Node of this object.

Throws:
javax.jcr.RepositoryException - if an error occurs

getNodeTypeName

String getNodeTypeName()
                       throws javax.jcr.RepositoryException
Deprecated. 
returns primary node type name of the associated Node of this object.

Throws:
javax.jcr.RepositoryException - if an error occurs

getItemType

ItemType getItemType()
                     throws javax.jcr.RepositoryException
Deprecated. 
Get the magnolia ItemType.

Returns:
the type
Throws:
javax.jcr.RepositoryException

restore

void restore(String versionName,
             boolean removeExisting)
             throws javax.jcr.version.VersionException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.RepositoryException
Deprecated. 
Restores this node to the state defined by the version with the specified versionName.

Parameters:
versionName -
removeExisting -
Throws:
javax.jcr.version.VersionException - if the specified versionName does not exist in this node's version history
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

restore

void restore(javax.jcr.version.Version version,
             boolean removeExisting)
             throws javax.jcr.version.VersionException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.RepositoryException
Deprecated. 
Restores this node to the state defined by the specified version.

Parameters:
version -
removeExisting -
Throws:
javax.jcr.version.VersionException - if the specified version is not part of this node's version history
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

restore

void restore(javax.jcr.version.Version version,
             String relPath,
             boolean removeExisting)
             throws javax.jcr.version.VersionException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.RepositoryException
Deprecated. 
Restores the specified version to relPath, relative to this node.

Parameters:
version -
relPath -
removeExisting -
Throws:
javax.jcr.version.VersionException - if the specified version is not part of this node's version history
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

restoreByLabel

void restoreByLabel(String versionLabel,
                    boolean removeExisting)
                    throws javax.jcr.version.VersionException,
                           javax.jcr.UnsupportedRepositoryOperationException,
                           javax.jcr.RepositoryException
Deprecated. 
Restores this node to the state recorded in the version specified by versionLabel.

Parameters:
versionLabel -
removeExisting -
Throws:
javax.jcr.version.VersionException - if the specified versionLabel does not exist in this node's version history
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

addVersion

javax.jcr.version.Version addVersion()
                                     throws javax.jcr.UnsupportedRepositoryOperationException,
                                            javax.jcr.RepositoryException
Deprecated. 
add version leaving the node checked out.

Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException - if an error occurs

addVersion

javax.jcr.version.Version addVersion(Rule rule)
                                     throws javax.jcr.UnsupportedRepositoryOperationException,
                                            javax.jcr.RepositoryException
Deprecated. 
add version leaving the node checked out.

Parameters:
rule - to be used to collect content
Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException - if an error occurs
See Also:
Rule

isModified

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. 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.

Returns:
true if this item is modified; false otherwise.

getVersionHistory

javax.jcr.version.VersionHistory getVersionHistory()
                                                   throws javax.jcr.UnsupportedRepositoryOperationException,
                                                          javax.jcr.RepositoryException
Deprecated. 
Returns:
version history
Throws:
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

getAllVersions

javax.jcr.version.VersionIterator getAllVersions()
                                                 throws javax.jcr.UnsupportedRepositoryOperationException,
                                                        javax.jcr.RepositoryException
Deprecated. 
Returns:
Version iterator retreived from version history
Throws:
javax.jcr.RepositoryException - if an error occurs
javax.jcr.UnsupportedRepositoryOperationException

getBaseVersion

ContentVersion getBaseVersion()
                              throws javax.jcr.UnsupportedRepositoryOperationException,
                                     javax.jcr.RepositoryException
Deprecated. 
get the current base version of this node.

Returns:
base ContentVersion
Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException

getVersionedContent

ContentVersion getVersionedContent(javax.jcr.version.Version version)
                                   throws javax.jcr.RepositoryException
Deprecated. 
get content view over the jcr version object.

Parameters:
version -
Returns:
version object wrapped in ContentVersion
Throws:
javax.jcr.RepositoryException
See Also:
ContentVersion

getVersionedContent

ContentVersion getVersionedContent(String versionName)
                                   throws javax.jcr.RepositoryException
Deprecated. 
get content view over the jcr version object.

Parameters:
versionName -
Returns:
version object wrapped in ContentVersion
Throws:
javax.jcr.RepositoryException
See Also:
ContentVersion

removeVersionHistory

void removeVersionHistory()
                          throws AccessDeniedException,
                                 javax.jcr.RepositoryException
Deprecated. 
removes all versions of this node and associated version graph.

Throws:
AccessDeniedException - If not allowed to do write operations on this node
javax.jcr.RepositoryException - if unable to remove versions from version store

save

void save()
          throws javax.jcr.RepositoryException
Deprecated. 
Persists all changes to the repository if validation succeeds.

Throws:
javax.jcr.RepositoryException - if an error occurs

isGranted

@Deprecated
boolean isGranted(long permissions)
Deprecated. since 4.5. Use PermissionUtil#isGranted(String, String, long) or PermissionUtil#isGranted(javax.jcr.Session, String, String) instead. To convert old style permissions to the new ones, please see PermissionUtil#convertPermissions(long).

Checks for the allowed access rights.

Parameters:
permissions - as defined in javax.jcr.Permission
Returns:
true if the current user has specified access on this node.

delete

void delete()
            throws javax.jcr.RepositoryException
Deprecated. 
Remove this path.

Throws:
javax.jcr.RepositoryException - if an error occurs

delete

void delete(String path)
            throws javax.jcr.RepositoryException
Deprecated. 
Remove specified path.

Throws:
javax.jcr.RepositoryException - if an error occurs

isNodeData

boolean isNodeData(String path)
                   throws AccessDeniedException,
                          javax.jcr.RepositoryException
Deprecated. 
checks if the requested resource is an NodeData (Property).

Parameters:
path - of the requested NodeData
Returns:
boolean true is the requested content is an NodeData
Throws:
AccessDeniedException
AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
javax.jcr.RepositoryException - if an error occurs

refresh

void refresh(boolean keepChanges)
             throws javax.jcr.RepositoryException
Deprecated. 
If keepChanges is false, this method discards all pending changes recorded in this session.

Throws:
javax.jcr.RepositoryException - if an error occurs
See Also:
Item.refresh(boolean)

getUUID

String getUUID()
Deprecated. 
UUID of the node referenced by this object.

Returns:
uuid

addMixin

void addMixin(String type)
              throws javax.jcr.RepositoryException
Deprecated. 
add specified mixin type if allowed.

Parameters:
type - mixin type to be added
Throws:
javax.jcr.RepositoryException - if an error occurs

removeMixin

void removeMixin(String type)
                 throws javax.jcr.RepositoryException
Deprecated. 
Removes the specified mixin node type from this node. Also removes mixinName from this node's jcr:mixinTypes property. The mixin node type removal takes effect on save.

Parameters:
type - , mixin type to be removed
Throws:
javax.jcr.RepositoryException - if an error occurs

getMixinNodeTypes

javax.jcr.nodetype.NodeType[] getMixinNodeTypes()
                                                throws javax.jcr.RepositoryException
Deprecated. 
Returns an array of NodeType objects representing the mixin node types assigned to this node. This includes only those mixin types explicitly assigned to this node, and therefore listed in the property jcr:mixinTypes. It does not include mixin types inherited through the addition of supertypes to the primary type hierarchy.

Returns:
an array of mixin NodeType objects.
Throws:
javax.jcr.RepositoryException - if an error occurs

lock

javax.jcr.lock.Lock lock(boolean isDeep,
                         boolean isSessionScoped)
                         throws javax.jcr.lock.LockException,
                                javax.jcr.RepositoryException
Deprecated. 
places a lock on this object.

Parameters:
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.
Returns:
A Lock object containing a lock token.
Throws:
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 occurs
See Also:
Node.lock(boolean,boolean)

lock

javax.jcr.lock.Lock lock(boolean isDeep,
                         boolean isSessionScoped,
                         long yieldFor)
                         throws javax.jcr.lock.LockException,
                                javax.jcr.RepositoryException
Deprecated. 
places a lock on this object.

Parameters:
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 lock
Returns:
A Lock object containing a lock token.
Throws:
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 occurs
See Also:
Node.lock(boolean,boolean)

getLock

javax.jcr.lock.Lock getLock()
                            throws javax.jcr.lock.LockException,
                                   javax.jcr.RepositoryException
Deprecated. 
Returns the Lock object that applies to this node. This may be either a lock on this node itself or a deep lock on a node above this node.

Throws:
javax.jcr.lock.LockException - If no lock applies to this node, a LockException is thrown.
javax.jcr.RepositoryException - if an error occurs

unlock

void unlock()
            throws javax.jcr.lock.LockException,
                   javax.jcr.RepositoryException
Deprecated. 
Removes the lock on this node. Also removes the properties jcr:lockOwner and jcr:lockIsDeep from this node. These changes are persisted automatically; there is no need to call save.

Throws:
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 token
javax.jcr.RepositoryException - if an error occurs

holdsLock

boolean holdsLock()
                  throws javax.jcr.RepositoryException
Deprecated. 
Returns true if this node holds a lock; otherwise returns false. To hold a lock means that this node has actually had a lock placed on it specifically, as opposed to just having a lock apply to it due to a deep lock held by a node above.

Returns:
a boolean
Throws:
javax.jcr.RepositoryException - if an error occurs

isLocked

boolean isLocked()
                 throws javax.jcr.RepositoryException
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.

Returns:
a boolean
Throws:
javax.jcr.RepositoryException - if an error occurs

getWorkspace

javax.jcr.Workspace getWorkspace()
                                 throws javax.jcr.RepositoryException
Deprecated. 
get workspace to which this node attached to.

Throws:
javax.jcr.RepositoryException - if unable to get this node session

getAccessManager

@Deprecated
AccessManager getAccessManager()
Deprecated. since 4.0 - use getHierarchyManager instead

Returns:
the underlying AccessManager

getHierarchyManager

HierarchyManager getHierarchyManager()
Deprecated. 

hasMetaData

boolean hasMetaData()
Deprecated. 
checks if this node has a sub node with name MetaData.

Returns:
true if MetaData exists

hasMixin

boolean hasMixin(String mixinName)
                 throws javax.jcr.RepositoryException
Deprecated. 
Checks whether or not given mixin is assigned to a type.

Throws:
javax.jcr.RepositoryException


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.