Package org.ametys.web.explorer
Class ResourceHelper
java.lang.Object
org.ametys.web.explorer.ResourceHelper
Helper methods related to
Resource
s and ResourceCollection
s.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
getRightsContext
(String objectPath, String resourcePath) Get the rights context of a resource.static final String
getRightsContext
(ExplorerNode explorerNode) Get the rights context of an explorer node.static final String
getSharedRootName
(String objectPath) Get the shared root name of a shared resource or collectionstatic final String
getSharedRootName
(ExplorerNode explorerNode) Get the shared root name of a shared explorer node.static final String
getSharedRootName
(Resource resource) Get the shared root name of a shared resource.static final String
getSharedRootName
(ResourceCollection collection) Get the shared root name of a shared resource collection.static final boolean
Test if a resource or resource collection belongs to a shared tree.static final boolean
isShared
(ExplorerNode explorerNode) Test if an explorer node belongs to a shared tree.static final boolean
Test if a resource belongs to a shared tree.static final boolean
isShared
(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.