Package org.opencms.workplace.explorer
Class CmsExplorerTypeAccess
java.lang.Object
org.opencms.workplace.explorer.CmsExplorerTypeAccess
- All Implemented Interfaces:
Serializable
Explorer type access object, encapsulates access control entries and lists of a explorer type.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static CmsExplorerTypeAccessFlushListener
The listener used to flush cached access settings.static final String
Principal key name for the default permission settings. -
Constructor Summary
ConstructorDescriptionConstructor, creates an empty, CmsExplorerTypeAccess object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccessEntry
(String key, String value) Adds a single access entry to the map of access entries of the explorer type setting.void
createAccessControlList
(String resourceType) Creates the access control list from the temporary map.protected void
Flushes the permission cache.Returns the computed access Control List.Returns the map of access entries of the explorer type setting.getPermissions
(CmsObject cms, CmsResource resource) Calculates the permissions for this explorer type settings for the user in the given OpenCms user context.boolean
isEmpty()
Tests if there are any access information stored.
-
Field Details
-
PRINCIPAL_DEFAULT
Principal key name for the default permission settings.- See Also:
-
flushListener
The listener used to flush cached access settings.
-
-
Constructor Details
-
CmsExplorerTypeAccess
public CmsExplorerTypeAccess()Constructor, creates an empty, CmsExplorerTypeAccess object.
-
-
Method Details
-
addAccessEntry
Adds a single access entry to the map of access entries of the explorer type setting.This stores the configuration data in a map which is used in the initialize process to create the access control list.
- Parameters:
key
- the principal of the acevalue
- the permissions for the principal
-
createAccessControlList
Creates the access control list from the temporary map.- Parameters:
resourceType
- the name of the resource type- Throws:
CmsException
- if something goes wrong
-
getAccessControlList
Returns the computed access Control List.- Returns:
- the computed access Control List
-
getAccessEntries
Returns the map of access entries of the explorer type setting.- Returns:
- the map of access entries of the explorer type setting
-
getPermissions
Calculates the permissions for this explorer type settings for the user in the given OpenCms user context.- Parameters:
cms
- the OpenCms user context to calculate the permissions forresource
- the resource to check the permissions for- Returns:
- the permissions for this explorer type settings for the user in the given OpenCms user context
-
isEmpty
Tests if there are any access information stored.- Returns:
- true or false
-
flushCache
Flushes the permission cache.
-