Class CmsPermissionBean
java.lang.Object
org.opencms.ui.dialogs.permissions.CmsPermissionBean
Bean for permissions which have changed.
-
Constructor Summary
ConstructorDescriptionCmsPermissionBean
(String principalType, String principalName) Constructor for delete permission.CmsPermissionBean
(String principalType, String principalName, int allowed, int denied, int flags) Constructor for new or edited permission.CmsPermissionBean
(String principalType, String principalName, String permissionString) Constructor with permission string. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Gets the allowed flag.static CmsPermissionBean
getBeanForPrincipal
(Set<CmsPermissionBean> beans, String principalName) Gets the bean for principal from list of beans.int
Gets the denied flag.int
getFlags()
Gets the flag.Returns the permission string.Gets the principal name.static String
getPrincipalNameFromACE
(CmsObject cms, CmsAccessControlEntry entry) Get name of principal from ACE.Gets the type of the principal.int
hashCode()
boolean
Returns whether the permission should be removed.boolean
Checks if principal is real.void
setFlags
(int flags) Sets the flag of the ACE.toAccessControlEntry
(CmsObject cms, CmsUUID resID) Creates ACE from bean.
-
Constructor Details
-
CmsPermissionBean
Constructor for delete permission.- Parameters:
principalType
- principal typeprincipalName
- principal name
-
CmsPermissionBean
public CmsPermissionBean(String principalType, String principalName, int allowed, int denied, int flags) Constructor for new or edited permission.- Parameters:
principalType
- principal typeprincipalName
- principal nameallowed
- intdenied
- intflags
- int
-
CmsPermissionBean
Constructor with permission string.- Parameters:
principalType
- typeprincipalName
- namepermissionString
- permission string
-
-
Method Details
-
getBeanForPrincipal
public static CmsPermissionBean getBeanForPrincipal(Set<CmsPermissionBean> beans, String principalName) Gets the bean for principal from list of beans.- Parameters:
beans
- to look principal upprincipalName
- name of principal to get bean of- Returns:
- CmsPermissionBean
-
getPrincipalNameFromACE
Get name of principal from ACE.- Parameters:
cms
- CmsObjectentry
- ACE- Returns:
- principal name
-
equals
-
getAllowed
Gets the allowed flag.- Returns:
- int
-
getDenied
Gets the denied flag.- Returns:
- int
-
getFlags
Gets the flag.- Returns:
- int
-
getPermissionString
Returns the permission string.- Returns:
- the permission string or null if not set
-
getPrincipalName
Gets the principal name.- Returns:
- the name of the principal
-
getPrincipalType
Gets the type of the principal.- Returns:
- String
-
hashCode
-
isDeleted
Returns whether the permission should be removed.- Returns:
- true-> permission will be removed
-
isRealPrinciple
Checks if principal is real.- Returns:
- true if principal is real
-
setFlags
Sets the flag of the ACE.- Parameters:
flags
- to be set
-
toAccessControlEntry
Creates ACE from bean.- Parameters:
cms
- CmsObjectresID
- id of resource- Returns:
- CmsAccessControlEntry
-