Package nl.gx.webmanager.authorization
Interface Role
-
- All Superinterfaces:
HtmlObjectWrapper
@Indexable public interface Role extends HtmlObjectWrapper
A subset of user characteristics as defined by the context of an organization.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
checkAccess(String permissionValue)
Returns true if this role has access to given permission.void
copyPermissionsFromGroup(String permissionGroupId)
void
delete()
Deletes this Role.Permission[]
getAllPermissions()
Returns all permissions assigned to this role, directly by a permission group or by inheritence of roles.boolean
getAllWebInitiatives()
Return if this role is available on all web initiativesString
getExternalName()
Gets the name of this role as used within an external authorization system.Permission[]
getGroupPermissions()
This method returns all permissions that are assigned indirectly by assiging permission groups to the role.Permission[]
getInheritedPermissions()
This method returns all permissions that were inherited from from a superrole.String
getName()
Returns the name of the role.String[]
getPageSectionLabels()
Return all page section labels assigned to this role Note that the names "block" and "page section" both refer to the same concept.PermissionGroup[]
getPermissionGroups()
Returns all PermissionGroup object instances assigned to the role.Permission[]
getPermissions()
This method returns only the permissions that are assigned to this role explicitely.Role[]
getSubRoles()
Returns all Role object instances that are a subrole of this role.Role
getSuperRole()
Returns the direct superrole of this role.Role[]
getSuperRoles()
Returns recursively all Role object instances that are a superrole of this role.MenuItem[]
getToolbarElementIcons()
Deprecated.XC does not support configurable toolbar iconsMenuItem[]
getToolbarElements()
Deprecated.XC does not support configurable toolbar iconsUser[]
getUsers()
Returns an array of users that are in this role.boolean
isDeveloperRole()
A role is considered to be a developer role if at least one permission group is assigned to the role with 'development=true'.boolean
isValidSuperRole(Role superRoleCandidate)
Return true if the superRoleCandidate a valid super role for this role.void
setAllWebInitiatives(boolean allwebs)
Sets the all web initiatives property to the given valuevoid
setExternalName(String externalName)
Sets the name of this role as used within an external authorization system.void
setName(String name)
Set the name of the role.void
setPermissionGroups(PermissionGroup[] groups)
Set the permission groups of a role.void
setPermissions(Permission[] permissions)
Set the permissions of a role.void
setSuperRole(Role role)
Set the direct superrole of this role.void
setToolbarElementIcons(MenuItem[] toolbarElements)
Deprecated.XC does not support configurable toolbar iconsvoid
setUsers(User[] users)
Set the users that are in this role.-
Methods inherited from interface nl.gx.webmanager.authorization.HtmlObjectWrapper
getId, getUuid
-
-
-
-
Method Detail
-
checkAccess
boolean checkAccess(String permissionValue)
Returns true if this role has access to given permission.- Parameters:
permissionValue
- Value that uniquely identifies the permission to check- Returns:
- true if this role has access to given permission
-
getName
@ReferField(stored=false, indexed=true) String getName()
Returns the name of the role.- Returns:
- the name of the role
-
setName
void setName(String name)
Set the name of the role.- Parameters:
name
- Name for the role.
-
getPermissionGroups
PermissionGroup[] getPermissionGroups()
Returns all PermissionGroup object instances assigned to the role.- Returns:
- all PermissionGroup object instances assigned to the role
-
getAllPermissions
Permission[] getAllPermissions()
Returns all permissions assigned to this role, directly by a permission group or by inheritence of roles.- Returns:
- Array with all permissions assigned to this role
-
getPermissions
Permission[] getPermissions()
This method returns only the permissions that are assigned to this role explicitely. Permissions assgined from a permission group or inherited from a superrole are not included.- Returns:
- Array of all explicitely assigned permissions
-
getGroupPermissions
Permission[] getGroupPermissions()
This method returns all permissions that are assigned indirectly by assiging permission groups to the role. It does not include explicitely assigned permissions or inherited permissions.- Returns:
- Array of all permissions assigned from permission groups
-
getInheritedPermissions
Permission[] getInheritedPermissions()
This method returns all permissions that were inherited from from a superrole. It does not include any explicitely assigned permission or permission assigned from a permission group- Returns:
- Array of all permissions inherited from superroles
-
getSubRoles
Role[] getSubRoles()
Returns all Role object instances that are a subrole of this role.- Returns:
- all Role object instances that are a subrole of this role
-
getSuperRole
Role getSuperRole()
Returns the direct superrole of this role.- Returns:
- The direct superrole of this role.
-
setSuperRole
void setSuperRole(Role role)
Set the direct superrole of this role.- Parameters:
role
- Role to set as direct superrole
-
getSuperRoles
Role[] getSuperRoles()
Returns recursively all Role object instances that are a superrole of this role.- Returns:
- recursively all Role object instances that are a superrole of this role
-
setPermissionGroups
void setPermissionGroups(PermissionGroup[] groups)
Set the permission groups of a role.- Parameters:
groups
- Array of PermissionGroup object instances
-
setPermissions
void setPermissions(Permission[] permissions)
Set the permissions of a role.- Parameters:
permissions
- Array of Permission object instances
-
getUsers
User[] getUsers()
Returns an array of users that are in this role.- Returns:
- an array of users that are in this role
-
setUsers
void setUsers(User[] users)
Set the users that are in this role.- Parameters:
users
- Array of User class instances.
-
getToolbarElements
@Deprecated MenuItem[] getToolbarElements()
Deprecated.XC does not support configurable toolbar iconsReturns all toolbar elements for a role, including the toolbar elements for super roles.- Returns:
- All toolbar elements for a role, including the toolbar elements for super roles
-
getToolbarElementIcons
@Deprecated MenuItem[] getToolbarElementIcons()
Deprecated.XC does not support configurable toolbar iconsReturns all toolbar elements that are shown as icons in the toolbar for a role, including the toolbar elemens for super roles.- Returns:
- All toolbar elements that are shown as icons in the toolbar for a role, including the toolbar elemens for super roles
-
setToolbarElementIcons
@Deprecated void setToolbarElementIcons(MenuItem[] toolbarElements)
Deprecated.XC does not support configurable toolbar iconsSets the toolbar elements that are shown as icons in the toolbar for a role.- Parameters:
toolbarElements
- Array of toolbar elements
-
getPageSectionLabels
String[] getPageSectionLabels()
Return all page section labels assigned to this role Note that the names "block" and "page section" both refer to the same concept.- Returns:
-
copyPermissionsFromGroup
void copyPermissionsFromGroup(String permissionGroupId)
-
isValidSuperRole
boolean isValidSuperRole(Role superRoleCandidate)
Return true if the superRoleCandidate a valid super role for this role. The superRoleCandidate is not a valid super role for this role if this role is one of this superRoleCandidate's super roles.- Parameters:
superRoleCandidate
- Role to check whether it may be a valid superrole for this role- Returns:
- true if the superRoleCandidate a valid super role for this role
-
isDeveloperRole
boolean isDeveloperRole()
A role is considered to be a developer role if at least one permission group is assigned to the role with 'development=true'. The permission group may also be inherited from a super role. By default this is only the 'Developer' permission group.- Returns:
- true if this Role is considered to be a developer role, false otherwise
-
setAllWebInitiatives
void setAllWebInitiatives(boolean allwebs)
Sets the all web initiatives property to the given value- Parameters:
allwebs
- value of the web initiatives property
-
getAllWebInitiatives
boolean getAllWebInitiatives()
Return if this role is available on all web initiatives- Returns:
- true if the role is available on all web initiatives, false otherwise
-
delete
void delete()
Deletes this Role.
-
setExternalName
void setExternalName(String externalName)
Sets the name of this role as used within an external authorization system.- Parameters:
externalName
- can be used within an external authorization system to identify this role
-
getExternalName
String getExternalName()
Gets the name of this role as used within an external authorization system.- Returns:
- the name of this role as used within an external authorization system
-
-