info.magnolia.cms.core
Class DefaultHierarchyManager

java.lang.Object
  extended by info.magnolia.cms.core.DefaultHierarchyManager
All Implemented Interfaces:
HierarchyManager, Serializable

Deprecated. since 4.5. Use Session and its methods instead.

@Deprecated
public class DefaultHierarchyManager
extends Object
implements HierarchyManager, Serializable

Default JCR-based implementation of HierarchyManager.

Version:
$Id$
Author:
Sameer Charles
See Also:
Serialized Form

Constructor Summary
DefaultHierarchyManager(javax.jcr.Session jcrSession)
          Deprecated.  
DefaultHierarchyManager(javax.jcr.Session jcrSession, String ignored)
          Deprecated. Only used in tests.
DefaultHierarchyManager(String ignoredUserId, javax.jcr.Session jcrSession)
          Deprecated.  
DefaultHierarchyManager(String userId, javax.jcr.Session jcrSession, AccessManager ignoredAccessManager)
          Deprecated.  
 
Method Summary
 void copyTo(String source, String destination)
          Deprecated. copy content to the specified location.
 Content createContent(String path, String label, String contentType)
          Deprecated. Creates contentNode of type contentType. contentType must be defined in item type definition of Magnolia as well as JCR implementation.
 void delete(String path)
          Deprecated. removes specified path, it can be either node or property.
 boolean equals(Object obj)
          Deprecated.  
 AccessManager getAccessManager()
          Deprecated. Get access manager.
 Content getContent(String path)
          Deprecated. get content object of the requested URI.
 Content getContent(String path, boolean create, ItemType type)
          Deprecated. Like getContent() but creates the node if not yet existing.
 Content getContentByUUID(String uuid)
          Deprecated. This method can be used to retrieve Content which has UUID assigned to it, in other words only those nodes which has mixin type mix:referenceable.
protected  javax.jcr.Session getJcrSession()
          Deprecated.  
 String getName()
          Deprecated.  
 NodeData getNodeData(String path)
          Deprecated. get NodeData object of the requested URI.
 Content getPage(String path, String templateName)
          Deprecated. since 4.0 - only used by taglibs - should go/move.
 QueryManager getQueryManager()
          Deprecated.  
 Content getRoot()
          Deprecated.  
 javax.jcr.Workspace getWorkspace()
          Deprecated. gets currently used workspace for this hierarchy manager.
 int hashCode()
          Deprecated.  
 boolean hasPendingChanges()
          Deprecated. Returns true if the session has pending (unsaved) changes.
 boolean isExist(String path)
          Deprecated. check is either the node or property exists with the specified path and user has access to it.
 boolean isGranted(String path, long oldPermissions)
          Deprecated. Checks for the allowed access rights.
 boolean isNodeData(String path)
          Deprecated. checks if the requested resource is an NodeData (Property).
 void moveTo(String source, String destination)
          Deprecated. move content to the specified location.
 void refresh(boolean keepChanges)
          Deprecated. Refreshes this session.
 void save()
          Deprecated. Persists all changes to the repository if validation succeeds.
protected  void setAccessManager(AccessManager accessManager)
          Deprecated. Set access manager for this hierarchy.
protected  void setJcrSession(javax.jcr.Session jcrSession)
          Deprecated.  
protected  void setMetaData(MetaData md)
          Deprecated. Helper method to set page properties, create page calls this method. you could call this method anytime to create working page properties.
protected  void setQueryManager(QueryManager queryManager)
          Deprecated. Set query manager for this hierarchy.
protected  Content wrapAsContent(javax.jcr.Node node)
          Deprecated.  
 Content wrapAsContent(javax.jcr.Node rootNode, String path)
          Deprecated.  
protected  Content wrapAsContent(javax.jcr.Node rootNode, String path, String contentType)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHierarchyManager

public DefaultHierarchyManager(javax.jcr.Session jcrSession)
Deprecated. 

DefaultHierarchyManager

public DefaultHierarchyManager(String userId,
                               javax.jcr.Session jcrSession,
                               AccessManager ignoredAccessManager)
                        throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

DefaultHierarchyManager

public DefaultHierarchyManager(String ignoredUserId,
                               javax.jcr.Session jcrSession)
                        throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

DefaultHierarchyManager

public DefaultHierarchyManager(javax.jcr.Session jcrSession,
                               String ignored)
Deprecated. 
Only used in tests.

Method Detail

setAccessManager

protected void setAccessManager(AccessManager accessManager)
Deprecated. 
Set access manager for this hierarchy.

Parameters:
accessManager -

getAccessManager

public AccessManager getAccessManager()
Deprecated. 
Get access manager.

Specified by:
getAccessManager in interface HierarchyManager
Returns:
accessmanager attached to this hierarchy

setQueryManager

protected void setQueryManager(QueryManager queryManager)
Deprecated. 
Set query manager for this hierarchy.

Parameters:
queryManager -

getQueryManager

public QueryManager getQueryManager()
Deprecated. 
Specified by:
getQueryManager in interface HierarchyManager

getJcrSession

protected javax.jcr.Session getJcrSession()
Deprecated. 

setJcrSession

protected void setJcrSession(javax.jcr.Session jcrSession)
Deprecated. 

createContent

public Content createContent(String path,
                             String label,
                             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.

Specified by:
createContent in interface HierarchyManager
Parameters:
path - absolute (primary) path to this Node
label - page name
contentType - , JCR node type as configured
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

wrapAsContent

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

setMetaData

protected void setMetaData(MetaData md)
                    throws javax.jcr.RepositoryException,
                           AccessDeniedException
Deprecated. 
Helper method to set page properties, create page calls this method. you could call this method anytime to create working page properties.

Throws:
javax.jcr.RepositoryException
AccessDeniedException

getContent

public Content getContent(String path)
                   throws javax.jcr.PathNotFoundException,
                          javax.jcr.RepositoryException,
                          AccessDeniedException
Deprecated. 
get content object of the requested URI.

Specified by:
getContent in interface HierarchyManager
Parameters:
path - of the content to be initialized
Returns:
Content
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

wrapAsContent

public Content wrapAsContent(javax.jcr.Node rootNode,
                             String path)
                      throws AccessDeniedException,
                             javax.jcr.PathNotFoundException,
                             javax.jcr.RepositoryException
Deprecated. 
Throws:
AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

getContent

public Content getContent(String path,
                          boolean create,
                          ItemType type)
                   throws AccessDeniedException,
                          javax.jcr.RepositoryException
Deprecated. 
Like getContent() but creates the node if not yet existing. Attention save is not called!

Specified by:
getContent in interface HierarchyManager
Parameters:
path - the path of the node
create - true if the node should get created
type - the node type of the created node
Returns:
the node
Throws:
AccessDeniedException
javax.jcr.RepositoryException

getNodeData

public NodeData getNodeData(String path)
                     throws javax.jcr.PathNotFoundException,
                            javax.jcr.RepositoryException,
                            AccessDeniedException
Deprecated. 
get NodeData object of the requested URI.

Specified by:
getNodeData in interface HierarchyManager
Parameters:
path - of the atom to be initialized
Returns:
NodeData
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

getPage

@Deprecated
public Content getPage(String path,
                                  String templateName)
                throws javax.jcr.PathNotFoundException,
                       javax.jcr.RepositoryException,
                       AccessDeniedException
Deprecated. since 4.0 - only used by taglibs - should go/move.

returns the first page with a given template name that is found in tree that starts from the page given py the path (including this page).

Parameters:
path - handle of the page from where the search should start
templateName - template name to search for
Returns:
first Content hierarchy node that has the specified template name assigned
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

delete

public void delete(String path)
            throws javax.jcr.PathNotFoundException,
                   javax.jcr.RepositoryException,
                   AccessDeniedException
Deprecated. 
removes specified path, it can be either node or property.

Specified by:
delete in interface HierarchyManager
Parameters:
path - to be removed
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

getRoot

public Content getRoot()
                throws javax.jcr.RepositoryException,
                       AccessDeniedException
Deprecated. 
Specified by:
getRoot in interface HierarchyManager
Returns:
rootNode of the current working repository-workspace
Throws:
javax.jcr.RepositoryException
AccessDeniedException

isExist

public boolean isExist(String path)
Deprecated. 
check is either the node or property exists with the specified path and user has access to it. If at least READ permission is not granted or not running in SystemContext, the method will return false even if the node in question exists.

Specified by:
isExist in interface HierarchyManager
Parameters:
path -

isGranted

public boolean isGranted(String path,
                         long oldPermissions)
Deprecated. 
Description copied from interface: HierarchyManager
Checks for the allowed access rights.

Specified by:
isGranted in interface HierarchyManager
Parameters:
path - path to content to be checked
oldPermissions - permission mask
Returns:
true if the current user has access on the provided node path.

isNodeData

public boolean isNodeData(String path)
                   throws AccessDeniedException
Deprecated. 
checks if the requested resource is an NodeData (Property).

Specified by:
isNodeData in interface HierarchyManager
Parameters:
path - of the requested NodeData
Returns:
boolean true is the requested content is an NodeData
Throws:
AccessDeniedException

getContentByUUID

public Content getContentByUUID(String uuid)
                         throws javax.jcr.ItemNotFoundException,
                                javax.jcr.RepositoryException,
                                AccessDeniedException
Deprecated. 
This method can be used to retrieve Content which has UUID assigned to it, in other words only those nodes which has mixin type mix:referenceable.

Specified by:
getContentByUUID in interface HierarchyManager
Parameters:
uuid -
Throws:
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

wrapAsContent

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

getWorkspace

public javax.jcr.Workspace getWorkspace()
Deprecated. 
gets currently used workspace for this hierarchy manager.

Specified by:
getWorkspace in interface HierarchyManager

moveTo

public void moveTo(String source,
                   String destination)
            throws javax.jcr.PathNotFoundException,
                   javax.jcr.RepositoryException,
                   AccessDeniedException
Deprecated. 
move content to the specified location.

Specified by:
moveTo in interface HierarchyManager
Parameters:
source - source node path
destination - node where the node has to be moved
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

copyTo

public void copyTo(String source,
                   String destination)
            throws javax.jcr.PathNotFoundException,
                   javax.jcr.RepositoryException,
                   AccessDeniedException
Deprecated. 
copy content to the specified location.

Specified by:
copyTo in interface HierarchyManager
Parameters:
source - source node path
destination - node where the node has to be copied
Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException

save

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

Specified by:
save in interface HierarchyManager
Throws:
javax.jcr.RepositoryException

hasPendingChanges

public boolean hasPendingChanges()
                          throws javax.jcr.RepositoryException
Deprecated. 
Returns true if the session has pending (unsaved) changes.

Specified by:
hasPendingChanges in interface HierarchyManager
Throws:
javax.jcr.RepositoryException

refresh

public void refresh(boolean keepChanges)
             throws javax.jcr.RepositoryException
Deprecated. 
Refreshes this session.

Specified by:
refresh in interface HierarchyManager
Parameters:
keepChanges -
Throws:
javax.jcr.RepositoryException
See Also:
Session.refresh(boolean)

getName

public String getName()
Deprecated. 
Specified by:
getName in interface HierarchyManager

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

equals

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


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