Class RolesHolderImpl<T>

    • Method Detail

      • getRolesWithScope

        @NotNull
        public Collection<Role> getRolesWithScope​(@NotNull
                                                  RoleScope scope)
        Description copied from interface: RolesHolder
        Returns all roles with specified scope.
        Specified by:
        getRolesWithScope in interface RolesHolder
        Parameters:
        scope - roles scope
        Returns:
        all roles with specified scope.
      • getUnfilteredScopes

        @NotNull
        public Collection<RoleScope> getUnfilteredScopes()
        Specified by:
        getUnfilteredScopes in interface RolesHolderEx
        Returns:
        unfiltered role scopes for this roles holder, unfiltered scopes include scopes for projects current user from security context does not have access too
      • getUnfilteredRoles

        @NotNull
        public Map<RoleScope,​Collection<Role>> getUnfilteredRoles()
        Specified by:
        getUnfilteredRoles in interface RolesHolderEx
        Returns:
        unfiltered map of role for this roles holder, unfiltered map include roles for projects current user from security context does not have access too
      • addRole

        public void addRole​(@NotNull
                            RoleScope scope,
                            @NotNull
                            Role role)
        Description copied from interface: RolesHolder
        Adds role with specified scope
        Specified by:
        addRole in interface RolesHolder
        Parameters:
        scope - scope of the role
        role - role
      • removeRole

        public void removeRole​(@NotNull
                               RoleScope scope,
                               @NotNull
                               Role role)
        Description copied from interface: RolesHolder
        Removes role with specified scope
        Specified by:
        removeRole in interface RolesHolder
        Parameters:
        scope - scope of the role
        role - role
      • removeRole

        public void removeRole​(@NotNull
                               Role role)
        Description copied from interface: RolesHolder
        Removes specified role. If the role is associated with several scopes all of these roles will be removed.
        Specified by:
        removeRole in interface RolesHolder
        Parameters:
        role - role to remove
      • removeRoles

        public void removeRoles​(@NotNull
                                RoleScope scope)
        Description copied from interface: RolesHolder
        Removes all of the roles having the specified scope.
        Specified by:
        removeRoles in interface RolesHolder
        Parameters:
        scope - scope of the role
      • isSystemAdministratorRoleGranted

        public boolean isSystemAdministratorRoleGranted()
        Description copied from interface: RolesHolder
        Returns true if this roles holder contains system administrator role granted directly or inherited via parent holders. Same as:
        isSystemAdministratorRoleGrantedDirectly() || isSystemAdministratorRoleInherited()
        Specified by:
        isSystemAdministratorRoleGranted in interface RolesHolder
        Returns:
        see above.
      • isSystemAdministratorRoleGrantedDirectly

        public boolean isSystemAdministratorRoleGrantedDirectly()
        Description copied from interface: RolesHolder
        Returns true if this roles holder contains system administrator role granted directly.
        Specified by:
        isSystemAdministratorRoleGrantedDirectly in interface RolesHolder
        Returns:
        see above.
      • isSystemAdministratorRoleInherited

        public boolean isSystemAdministratorRoleInherited()
        Description copied from interface: RolesHolder
        Returns true if one of the parents (transitively) of this roles holder contains system administrator role.
        Specified by:
        isSystemAdministratorRoleInherited in interface RolesHolder
        Returns:
        see above
      • resetRoles

        public void resetRoles()
        Description copied from interface: UserRolesInit
        Causes roles reloading from the database.
        Specified by:
        resetRoles in interface UserRolesInit
      • getHolderId

        public abstract T getHolderId()
        Returns id used to store roles
        Returns:
        roles holder id
      • getNumberOfRolesChanges

        public int getNumberOfRolesChanges()