|
||||||||||
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(String userId,
javax.jcr.Session jcrSession,
AccessManager aManager)
|
Method Summary | |
---|---|
void |
copyTo(String source,
String destination)
copy content to the specified location. |
Content |
createContent(String path,
String label,
String contentType)
Creates contentNode of type contentType. |
void |
delete(String path)
removes specified path, it can be either node or property. |
AccessManager |
getAccessManager()
Get access manager. |
Content |
getContent(String path)
get content object of the requested URI. |
Content |
getContent(String path,
boolean create,
ItemType type)
Like getContent() but creates the node if not yet existing. |
Content |
getContentByUUID(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. |
String |
getName()
|
NodeData |
getNodeData(String path)
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()
|
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(String path)
check is either the node or property exists with the specified path and user has access to it. |
boolean |
isGranted(String path,
long permissions)
Checks for the allowed access rights. |
boolean |
isNodeData(String path)
checks if the requested resource is an NodeData (Property). |
boolean |
isNodeType(String path,
ItemType type)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
boolean |
isNodeType(String path,
String type)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
boolean |
isPage(String path)
Deprecated. since 4.0 - use getContent().isNodeType() instead. (not used currently) |
void |
moveTo(String source,
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(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(String path, String label, 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(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(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(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(String path, 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(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(String path) throws AccessDeniedException
isPage
in interface HierarchyManager
path
- of the requested content
AccessDeniedException
public boolean isExist(String path)
isExist
in interface HierarchyManager
path
- public boolean isGranted(String path, long permissions)
HierarchyManager
isGranted
in interface HierarchyManager
path
- path to content to be checkedpermissions
- permission mask
@Deprecated public boolean isNodeType(String path, String type)
isNodeType
in interface HierarchyManager
@Deprecated public boolean isNodeType(String path, ItemType type)
isNodeType
in interface HierarchyManager
public boolean isNodeData(String path) throws AccessDeniedException
isNodeData
in interface HierarchyManager
path
- of the requested NodeData
AccessDeniedException
public Content getContentByUUID(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(String source, 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(String source, 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 String getName()
getName
in interface HierarchyManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |