Interface RolesManager

  • All Known Implementing Classes:
    RolesManagerImpl

    public interface RolesManager
    Maintains a group of roles currently defined in the system
    • Method Detail

      • getAvailableRoles

        @NotNull
        List<Role> getAvailableRoles()
        Returns list of roles configured in the system.
        Returns:
        list of roles configured in the system.
      • getAvailableRolesMap

        @NotNull
        Map<String,​Role> getAvailableRolesMap()
        Same as getAvailableRoles() but returns map where id of the role is a key.
        Returns:
        map of roles
      • findRoleById

        @Nullable
        Role findRoleById​(@NotNull
                          String roleId)
        Searches for a role with specified id
        Parameters:
        roleId - id of the role
        Returns:
        role with specified id or null
      • getSystemAdministratorRole

        @NotNull
        Role getSystemAdministratorRole()
        Returns predefined non configurable role representing system administrator. This role contains all of the permissions allowed in the server and it cannot be associated with a project.
        Returns:
        system administrator role, never null
      • getSuperUserRole

        @NotNull
        Role getSuperUserRole()
        Returns predefined non configurable role representing super user. This role contains all of the permissions and it cannot be associated with a project.
        Returns:
        super user role, never null
        Since:
        2020.2
      • deleteRole

        void deleteRole​(@NotNull
                        Role role)
        Deletes role
        Parameters:
        role - role to be deleted
      • getAllIncludedRoles

        Collection<? extends Role> getAllIncludedRoles​(@NotNull
                                                       Role role)
        Collects all roles recursively inlcuded in the role
        Parameters:
        role - role
        Returns:
        all roles included in the role
      • addRoleListener

        void addRoleListener​(@NotNull
                             RoleListener listener)
        Adds listener to the manager
        Parameters:
        listener - listener to add
      • removeRoleListener

        void removeRoleListener​(@NotNull
                                RoleListener listener)
        Removes listener to the manager
        Parameters:
        listener - listener to remove