info.magnolia.cms.core
Class DefaultContent

java.lang.Object
  extended by info.magnolia.cms.core.ContentHandler
      extended by info.magnolia.cms.core.AbstractContent
          extended by info.magnolia.cms.core.DefaultContent
All Implemented Interfaces:
Content, Cloneable
Direct Known Subclasses:
ContentVersion

Deprecated. since 4.5 use jcr.Node instead.

@Deprecated
public class DefaultContent
extends AbstractContent

Default, JCR-based, implementation of Content.

Version:
$Id: DefaultContent.java 54130 2012-02-08 07:21:03Z dlipp $

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.cms.core.Content
Content.ContentFilter
 
Field Summary
protected  javax.jcr.Node node
          Deprecated. Wrapped jcr node.
 
Constructor Summary
protected DefaultContent()
          Deprecated. Empty constructor.
  DefaultContent(javax.jcr.Node node)
          Deprecated. Constructor to get existing node.
protected DefaultContent(javax.jcr.Node rootNode, String path)
          Deprecated. Constructor to get existing node.
protected DefaultContent(javax.jcr.Node rootNode, String path, String contentType)
          Deprecated. Creates contentNode of type contentType contentType must be defined in item type definition of Magnolia as well as JCR implementation.
 
Method Summary
 BinaryNodeData addBinaryNodeData(String name)
          Deprecated.  
 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.
protected  HierarchyManager createHierarchyManager(javax.jcr.Session session)
          Deprecated.  
 void delete()
          Deprecated. Remove this path.
protected  int determineNodeDataType(String name)
          Deprecated.  
 boolean equals(Object obj)
          Deprecated.  
 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.
 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.
protected  Collection<NodeData> getPrimitiveNodeDatas(String namePattern)
          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.
protected  boolean hasBinaryNode(String name)
          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. Delegates to NodeData.isExist().
 boolean holdsLock()
          Deprecated. Returns true if this node holds a lock; otherwise returns false.
protected  boolean isCheckedOut()
          Deprecated. Returns true if this node is either
  • versionable and currently checked-out,
  • non-versionable and its nearest versionable ancestor is checked-out or
  • non-versionable and it has no versionable ancestor.
  •  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.
    protected  boolean isNodeType(javax.jcr.Node node, String type)
              Deprecated. private Helper method to evaluate primary node type of the given node.
     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.
    protected  void setNode(javax.jcr.Node node)
              Deprecated.  
     void unlock()
              Deprecated. Removes the lock on this node.
    protected  Content wrapAsContent(javax.jcr.Node node)
              Deprecated.  
    protected  Content wrapAsContent(javax.jcr.Node node, String name)
              Deprecated.  
    protected  Content wrapAsContent(javax.jcr.Node node, String name, String contentType)
              Deprecated.  
     
    Methods inherited from class info.magnolia.cms.core.AbstractContent
    createContent, createContent, createNodeData, createNodeData, createNodeData, createNodeData, createNodeData, delete, deleteNodeData, getBinaryNodeDatas, getChildByName, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getNodeData, getNodeDataCollection, getTemplate, getTitle, hasChildren, hasChildren, isGranted, isNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, setNodeData, toString, updateMetaData
     
    Methods inherited from class info.magnolia.cms.core.ContentHandler
    clone, getAccessManager, setAccessManager
     
    Methods inherited from class java.lang.Object
    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface info.magnolia.cms.core.Content
    getAccessManager
     

    Field Detail

    node

    protected javax.jcr.Node node
    Deprecated. 
    Wrapped jcr node.

    Constructor Detail

    DefaultContent

    protected DefaultContent()
    Deprecated. 
    Empty constructor. Should NEVER be used for standard use, test only.


    DefaultContent

    protected DefaultContent(javax.jcr.Node rootNode,
                             String path)
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
    Deprecated. 
    Constructor to get existing node.

    Parameters:
    rootNode - node to start with
    path - absolute (primary) path to this Node
    Throws:
    javax.jcr.PathNotFoundException - if the node at path does not exist
    AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
    javax.jcr.RepositoryException - if an error occurs

    DefaultContent

    public DefaultContent(javax.jcr.Node node)
    Deprecated. 
    Constructor to get existing node.

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

    DefaultContent

    protected DefaultContent(javax.jcr.Node rootNode,
                             String path,
                             String contentType)
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
    Deprecated. 
    Creates contentNode of type contentType contentType must be defined in item type definition of Magnolia as well as JCR implementation.

    Parameters:
    rootNode - node to start with
    path - absolute (primary) path to this Node
    contentType - JCR node type as configured
    Throws:
    javax.jcr.PathNotFoundException - if the node at path does not exist
    javax.jcr.RepositoryException - if an error occurs
    AccessDeniedException - if the current session does not have sufficient access rights to complete the operation
    Method Detail

    setNode

    protected void setNode(javax.jcr.Node node)
                    throws javax.jcr.RepositoryException
    Deprecated. 
    Parameters:
    node -
    Throws:
    javax.jcr.RepositoryException

    getContent

    public Content getContent(String name)
                       throws javax.jcr.PathNotFoundException,
                              javax.jcr.RepositoryException,
                              AccessDeniedException
    Deprecated. 
    Description copied from interface: Content
    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

    public Content createContent(String name,
                                 String contentType)
                          throws javax.jcr.PathNotFoundException,
                                 javax.jcr.RepositoryException,
                                 AccessDeniedException
    Deprecated. 
    Description copied from interface: Content
    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

    hasNodeData

    public boolean hasNodeData(String name)
                        throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from class: AbstractContent
    Delegates to NodeData.isExist().

    Specified by:
    hasNodeData in interface Content
    Overrides:
    hasNodeData in class AbstractContent
    Throws:
    javax.jcr.RepositoryException - if an error occurs

    newNodeDataInstance

    public NodeData newNodeDataInstance(String name,
                                        int type,
                                        boolean createIfNotExisting)
                                 throws AccessDeniedException,
                                        javax.jcr.RepositoryException
    Deprecated. 
    Description copied from class: AbstractContent
    As defined in 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.

    Specified by:
    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)
    Throws:
    AccessDeniedException
    javax.jcr.RepositoryException

    determineNodeDataType

    protected int determineNodeDataType(String name)
    Deprecated. 

    getMetaData

    public MetaData getMetaData()
    Deprecated. 
    Description copied from interface: Content
    Returns the meta data of the current node.

    Returns:
    MetaData meta information of the content Node

    getName

    public String getName()
    Deprecated. 
    Description copied from interface: Content
    get node name.

    Returns:
    String name of the current Node

    getChildren

    public Collection<Content> getChildren(Content.ContentFilter filter,
                                           String namePattern,
                                           Comparator<Content> orderCriteria)
    Deprecated. 
    Specified by:
    getChildren in class AbstractContent
    namePattern - ignored if null.

    wrapAsContent

    protected Content wrapAsContent(javax.jcr.Node node)
    Deprecated. 

    wrapAsContent

    protected Content wrapAsContent(javax.jcr.Node node,
                                    String name)
                             throws AccessDeniedException,
                                    javax.jcr.PathNotFoundException,
                                    javax.jcr.RepositoryException
    Deprecated. 
    Throws:
    AccessDeniedException
    javax.jcr.PathNotFoundException
    javax.jcr.RepositoryException

    wrapAsContent

    protected Content wrapAsContent(javax.jcr.Node node,
                                    String name,
                                    String contentType)
                             throws AccessDeniedException,
                                    javax.jcr.PathNotFoundException,
                                    javax.jcr.RepositoryException
    Deprecated. 
    Throws:
    AccessDeniedException
    javax.jcr.PathNotFoundException
    javax.jcr.RepositoryException

    getNodeDataCollection

    public Collection<NodeData> getNodeDataCollection(String namePattern)
    Deprecated. 
    Description copied from interface: Content
    Gets all node datas matching the given pattern. If no pattern is given (null), gets all node datas.


    getPrimitiveNodeDatas

    protected Collection<NodeData> getPrimitiveNodeDatas(String namePattern)
                                                  throws javax.jcr.RepositoryException
    Deprecated. 
    Throws:
    javax.jcr.RepositoryException

    hasContent

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

    getHandle

    public String getHandle()
    Deprecated. 
    Description copied from interface: Content
    get a handle representing path relative to the content repository.

    Returns:
    String representing path (handle) of the content

    getParent

    public Content getParent()
                      throws javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException,
                             AccessDeniedException
    Deprecated. 
    Description copied from interface: Content
    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

    public Content getAncestor(int level)
                        throws javax.jcr.PathNotFoundException,
                               javax.jcr.RepositoryException,
                               AccessDeniedException
    Deprecated. 
    Description copied from interface: Content
    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

    public Collection<Content> getAncestors()
                                     throws javax.jcr.PathNotFoundException,
                                            javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Convenience method for taglib.

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

    getLevel

    public int getLevel()
                 throws javax.jcr.PathNotFoundException,
                        javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public void orderBefore(String srcName,
                            String beforeName)
                     throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public int getIndex()
                 throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public javax.jcr.Node getJCRNode()
    Deprecated. 
    Description copied from interface: Content
    utility method to get Node object used to create current content object.

    Returns:
    Node

    isNodeType

    public boolean isNodeType(String type)
    Deprecated. 
    Description copied from interface: Content
    evaluate primary node type of the associated Node of this object.


    isNodeType

    protected boolean isNodeType(javax.jcr.Node node,
                                 String type)
    Deprecated. 
    private Helper method to evaluate primary node type of the given node.

    Parameters:
    node -
    type -

    getNodeType

    public javax.jcr.nodetype.NodeType getNodeType()
                                            throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    returns primary node type definition of the associated Node of this object.

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

    getNodeTypeName

    public String getNodeTypeName()
                           throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    returns primary node type name of the associated Node of this object.

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

    getItemType

    public ItemType getItemType()
                         throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Get the magnolia ItemType.

    Returns:
    the type
    Throws:
    javax.jcr.RepositoryException

    restore

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

    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

    public void restore(javax.jcr.version.Version version,
                        boolean removeExisting)
                 throws javax.jcr.version.VersionException,
                        javax.jcr.UnsupportedRepositoryOperationException,
                        javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Restores this node to the state defined by the specified version.

    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

    public void restore(javax.jcr.version.Version version,
                        String relPath,
                        boolean removeExisting)
                 throws javax.jcr.version.VersionException,
                        javax.jcr.UnsupportedRepositoryOperationException,
                        javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Restores the specified version to relPath, relative to this node.

    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

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

    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

    public javax.jcr.version.Version addVersion()
                                         throws javax.jcr.UnsupportedRepositoryOperationException,
                                                javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    add version leaving the node checked out.

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

    addVersion

    public javax.jcr.version.Version addVersion(Rule rule)
                                         throws javax.jcr.UnsupportedRepositoryOperationException,
                                                javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    addBinaryNodeData

    public BinaryNodeData addBinaryNodeData(String name)
    Deprecated. 

    isCheckedOut

    protected boolean isCheckedOut()
                            throws javax.jcr.RepositoryException
    Deprecated. 
    Returns true if this node is either Returns false if this node is either

    Returns:
    true if the node is checked out
    Throws:
    javax.jcr.RepositoryException

    isModified

    public boolean isModified()
    Deprecated. 
    Description copied from interface: Content
    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

    public 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

    public 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

    public ContentVersion getBaseVersion()
                                  throws javax.jcr.UnsupportedRepositoryOperationException,
                                         javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    get the current base version of this node.

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

    getVersionedContent

    public ContentVersion getVersionedContent(javax.jcr.version.Version version)
                                       throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    get content view over the jcr version object.

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

    getVersionedContent

    public ContentVersion getVersionedContent(String versionName)
                                       throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    get content view over the jcr version object.

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

    removeVersionHistory

    public void removeVersionHistory()
                              throws AccessDeniedException,
                                     javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public void save()
              throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Persists all changes to the repository if validation succeeds.

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

    delete

    public void delete()
                throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Remove this path.

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

    refresh

    public void refresh(boolean keepChanges)
                 throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public String getUUID()
    Deprecated. 
    Description copied from interface: Content
    UUID of the node referenced by this object.

    Returns:
    uuid

    addMixin

    public void addMixin(String type)
                  throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    add specified mixin type if allowed.

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

    removeMixin

    public void removeMixin(String type)
                     throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public javax.jcr.nodetype.NodeType[] getMixinNodeTypes()
                                                    throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public javax.jcr.lock.Lock lock(boolean isDeep,
                                    boolean isSessionScoped)
                             throws javax.jcr.lock.LockException,
                                    javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public javax.jcr.lock.Lock lock(boolean isDeep,
                                    boolean isSessionScoped,
                                    long yieldFor)
                             throws javax.jcr.lock.LockException,
                                    javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public javax.jcr.lock.Lock getLock()
                                throws javax.jcr.lock.LockException,
                                       javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public void unlock()
                throws javax.jcr.lock.LockException,
                       javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public boolean holdsLock()
                      throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    public boolean isLocked()
                     throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    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

    hasMetaData

    public boolean hasMetaData()
    Deprecated. 
    Description copied from interface: Content
    checks if this node has a sub node with name MetaData.

    Returns:
    true if MetaData exists

    hasMixin

    public boolean hasMixin(String mixinName)
                     throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    Checks whether or not given mixin is assigned to a type.

    Throws:
    javax.jcr.RepositoryException

    getHierarchyManager

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

    Specified by:
    getHierarchyManager in interface Content
    Specified by:
    getHierarchyManager in class ContentHandler
    Returns:
    HierarchyManager

    getWorkspace

    public javax.jcr.Workspace getWorkspace()
                                     throws javax.jcr.RepositoryException
    Deprecated. 
    Description copied from interface: Content
    get workspace to which this node attached to.

    Specified by:
    getWorkspace in interface Content
    Overrides:
    getWorkspace in class AbstractContent
    Throws:
    javax.jcr.RepositoryException - if unable to get this node session

    equals

    public boolean equals(Object obj)
    Deprecated. 
    Overrides:
    equals in class Object

    createHierarchyManager

    protected HierarchyManager createHierarchyManager(javax.jcr.Session session)
    Deprecated. 

    hasBinaryNode

    protected boolean hasBinaryNode(String name)
                             throws javax.jcr.RepositoryException
    Deprecated. 
    Throws:
    javax.jcr.RepositoryException


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