nl.gx.webmanager.authorization
Interface Role

All Superinterfaces:
HtmlObjectWrapper
All Known Implementing Classes:
RoleImpl

public interface Role
extends HtmlObjectWrapper

A subset of user characteristics as defined by the context of an organization.

Author:
arjans

Method Summary
 boolean checkAccess(java.lang.String permissionValue)
          Returns true if this role has access to given permission.
 void copyPermissionsFromGroup(java.lang.String permissionGroupId)
           
 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 initiatives
 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.
 java.lang.String getName()
          Returns the name of the role.
 java.lang.String[] getPageSectionLabels()
          Return all page section labels assigned to this role
 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()
          Returns all toolbar elements that are shown as icons in the toolbar for a role, including the toolbar elemens for super roles.
 MenuItem[] getToolbarElements()
          Returns all toolbar elements for a role, including the toolbar elements for super roles.
 User[] 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 value
 void setName(java.lang.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)
          Sets the toolbar elements that are shown as icons in the toolbar for a role.
 void 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(java.lang.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

java.lang.String getName()
Returns the name of the role.

Returns:
the name of the role

setName

void setName(java.lang.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

MenuItem[] getToolbarElements()
Returns 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

MenuItem[] getToolbarElementIcons()
Returns 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

void setToolbarElementIcons(MenuItem[] toolbarElements)
Sets the toolbar elements that are shown as icons in the toolbar for a role.

Parameters:
toolbarElements - Array of toolbar elements

getPageSectionLabels

java.lang.String[] getPageSectionLabels()
Return all page section labels assigned to this role

Returns:

copyPermissionsFromGroup

void copyPermissionsFromGroup(java.lang.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


Copyright © 2007-2011 GX Software BV. All Rights Reserved.