|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.core.DefaultHierarchyManager
public class DefaultHierarchyManager
Default JCR-based implementation of HierarchyManager
.
Constructor Summary | |
---|---|
protected |
DefaultHierarchyManager()
|
|
DefaultHierarchyManager(java.lang.String userId,
javax.jcr.Session jcrSession,
AccessManager aManager)
|
Method Summary | |
---|---|
void |
copyTo(java.lang.String source,
java.lang.String destination)
copy content to the specified location. |
Content |
createContent(java.lang.String path,
java.lang.String label,
java.lang.String contentType)
Creates contentNode of type contentType. |
void |
delete(java.lang.String path)
removes specified path, it can be either node or property. |
AccessManager |
getAccessManager()
Get access manager. |
Content |
getContent(java.lang.String path)
get content object of the requested URI. |
Content |
getContent(java.lang.String path,
boolean create,
ItemType type)
Like getContent() but creates the node if not yet existing. |
Content |
getContentByUUID(java.lang.String uuid)
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. |
java.lang.String |
getName()
|
NodeData |
getNodeData(java.lang.String path)
get NodeData object of the requested URI. |
Content |
getPage(java.lang.String path,
java.lang.String templateName)
Deprecated. since 4.0 - only used by taglibs - should go/move. |
QueryManager |
getQueryManager()
|
Content |
getRoot()
|
javax.jcr.Workspace |
getWorkspace()
gets currently used workspace for this hierarchy manager. |
boolean |
hasPendingChanges()
Returns true if the session has pending (unsaved) changes. |
boolean |
isExist(java.lang.String path)
check is either the node or property exists with the specified path and user has access to it. |
boolean |
isGranted(java.lang.String path,
long permissions)
Checks for the allowed access rights. |
boolean |
isNodeData(java.lang.String path)
checks if the requested resource is an NodeData (Property). |
boolean |
isNodeType(java.lang.String path,
ItemType type)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
boolean |
isNodeType(java.lang.String path,
java.lang.String type)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
boolean |
isPage(java.lang.String path)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
void |
moveTo(java.lang.String source,
java.lang.String destination)
move content to the specified location. |
void |
refresh(boolean keepChanges)
Refreshes this session. |
void |
save()
Persists all changes to the repository if validation succeeds. |
protected void |
setAccessManager(AccessManager accessManager)
Set access manager for this hierarchy. |
protected void |
setMetaData(MetaData md)
Helper method to set page properties, create page calls this method. |
protected void |
setQueryManager(QueryManager queryManager)
Set query manager for this hierarchy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DefaultHierarchyManager()
public DefaultHierarchyManager(java.lang.String userId, javax.jcr.Session jcrSession, AccessManager aManager) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Method Detail |
---|
protected void setAccessManager(AccessManager accessManager)
accessManager
- public AccessManager getAccessManager()
getAccessManager
in interface HierarchyManager
protected void setQueryManager(QueryManager queryManager)
queryManager
- public QueryManager getQueryManager()
getQueryManager
in interface HierarchyManager
public Content createContent(java.lang.String path, java.lang.String label, java.lang.String contentType) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
createContent
in interface HierarchyManager
path
- absolute (primary) path to this Node
label
- page namecontentType
- , JCR node type as configured
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
protected void setMetaData(MetaData md) throws javax.jcr.RepositoryException, AccessDeniedException
javax.jcr.RepositoryException
AccessDeniedException
public Content getContent(java.lang.String path) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
getContent
in interface HierarchyManager
path
- of the content to be initialized
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public Content getContent(java.lang.String path, boolean create, ItemType type) throws AccessDeniedException, javax.jcr.RepositoryException
getContent
in interface HierarchyManager
path
- the path of the nodecreate
- true if the node should get createdtype
- the node type of the created node
AccessDeniedException
javax.jcr.RepositoryException
public NodeData getNodeData(java.lang.String path) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
getNodeData
in interface HierarchyManager
path
- of the atom to be initialized
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
@Deprecated public Content getPage(java.lang.String path, java.lang.String templateName) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
getPage
in interface HierarchyManager
path
- handle of the page from where the search should starttemplateName
- template name to search for
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public void delete(java.lang.String path) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
delete
in interface HierarchyManager
path
- to be removed
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public Content getRoot() throws javax.jcr.RepositoryException, AccessDeniedException
getRoot
in interface HierarchyManager
javax.jcr.RepositoryException
AccessDeniedException
@Deprecated public boolean isPage(java.lang.String path) throws AccessDeniedException
isPage
in interface HierarchyManager
path
- of the requested content
AccessDeniedException
public boolean isExist(java.lang.String path)
isExist
in interface HierarchyManager
path
- public boolean isGranted(java.lang.String path, long permissions)
HierarchyManager
isGranted
in interface HierarchyManager
path
- path to content to be checkedpermissions
- permission mask
@Deprecated public boolean isNodeType(java.lang.String path, java.lang.String type)
isNodeType
in interface HierarchyManager
@Deprecated public boolean isNodeType(java.lang.String path, ItemType type)
isNodeType
in interface HierarchyManager
public boolean isNodeData(java.lang.String path) throws AccessDeniedException
isNodeData
in interface HierarchyManager
path
- of the requested NodeData
AccessDeniedException
public Content getContentByUUID(java.lang.String uuid) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
getContentByUUID
in interface HierarchyManager
uuid
-
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public javax.jcr.Workspace getWorkspace()
getWorkspace
in interface HierarchyManager
public void moveTo(java.lang.String source, java.lang.String destination) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
moveTo
in interface HierarchyManager
source
- source node pathdestination
- node where the node has to be moved
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public void copyTo(java.lang.String source, java.lang.String destination) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
copyTo
in interface HierarchyManager
source
- source node pathdestination
- node where the node has to be copied
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public void save() throws javax.jcr.RepositoryException
save
in interface HierarchyManager
javax.jcr.RepositoryException
public boolean hasPendingChanges() throws javax.jcr.RepositoryException
hasPendingChanges
in interface HierarchyManager
javax.jcr.RepositoryException
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
refresh
in interface HierarchyManager
keepChanges
-
javax.jcr.RepositoryException
Session.refresh(boolean)
public java.lang.String getName()
getName
in interface HierarchyManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |