Interface Role

    • 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
      • 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 icons
        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

        @Deprecated
        MenuItem[] getToolbarElementIcons()
        Deprecated.
        XC does not support configurable toolbar icons
        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

        @Deprecated
        void setToolbarElementIcons​(MenuItem[] toolbarElements)
        Deprecated.
        XC does not support configurable toolbar icons
        Sets 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