Package org.ametys.web.explorer
Class ResourceHelper
java.lang.Object
org.ametys.web.explorer.ResourceHelper
Helper methods related to
Resources and ResourceCollections.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetRightsContext(String objectPath, String resourcePath) Get the rights context of a resource.static final StringgetRightsContext(ExplorerNode explorerNode) Get the rights context of an explorer node.static final StringgetSharedRootName(String objectPath) Get the shared root name of a shared resource or collectionstatic final StringgetSharedRootName(ExplorerNode explorerNode) Get the shared root name of a shared explorer node.static final StringgetSharedRootName(Resource resource) Get the shared root name of a shared resource.static final StringgetSharedRootName(ResourceCollection collection) Get the shared root name of a shared resource collection.static final booleanTest if a resource or resource collection belongs to a shared tree.static final booleanisShared(ExplorerNode explorerNode) Test if an explorer node belongs to a shared tree.static final booleanTest if a resource belongs to a shared tree.static final booleanisShared(ResourceCollection collection) Test if a resource collection belongs to a shared tree.
-
Field Details
-
SHARED_RESOURCE_PATH
The shared resource base path in the repository.- See Also:
-
SHARED_RESOURCE_PREFIX
The shared resource prefix.- See Also:
-
-
Method Details
-
getRightsContext
Get the rights context of an explorer node.- Parameters:
explorerNode- the explorer node.- Returns:
- the explorer node rights context.
-
getRightsContext
Get the rights context of a resource.- Parameters:
objectPath- the path of the resource or collection AmetysObject.resourcePath- the path of the resource in the resource explorer.- Returns:
- the resource rights context.