Class UserGroupRoleUpdater

    • Constructor Detail

      • UserGroupRoleUpdater

        public UserGroupRoleUpdater​(@NotNull
                                    SQLRunnerEx sqlRunner,
                                    @NotNull
                                    RolesManager rolesManager)
    • Method Detail

      • addRole

        public void addRole​(@NotNull
                            String id,
                            @NotNull
                            RoleScope roleScope,
                            @NotNull
                            Role role)
        Description copied from interface: RolesUpdate
        Adds a role with specified scope to an entity with specified id.
        Specified by:
        addRole in interface RolesUpdate<String>
        Parameters:
        id - uid
        roleScope - scope of the role
        role - role
      • removeRole

        public void removeRole​(@NotNull
                               String id,
                               @NotNull
                               RoleScope roleScope,
                               @NotNull
                               Role role)
        Description copied from interface: RolesUpdate
        Removes role with specified scope from the entity with specified id.
        Specified by:
        removeRole in interface RolesUpdate<String>
        Parameters:
        id - id
        roleScope - scope of the role
        role - role
      • removeRole

        public void removeRole​(@NotNull
                               String id,
                               @NotNull
                               Role role)
        Description copied from interface: RolesUpdate
        Removes the specified role from the entity with specified id. The role is removed from all of the scopes.
        Specified by:
        removeRole in interface RolesUpdate<String>
        Parameters:
        id - id
        role - role to remove
      • removeRoles

        public void removeRoles​(@NotNull
                                String id,
                                @NotNull
                                RoleScope roleScope)
        Description copied from interface: RolesUpdate
        Removes all roles with specified scope from the entity with specified id.
        Specified by:
        removeRoles in interface RolesUpdate<String>
        Parameters:
        id - id
        roleScope - scope of the role
      • removeRole

        public void removeRole​(@NotNull
                               Role role)
        Description copied from interface: RolesUpdate
        Removes the specified role for all roles holders.
        Specified by:
        removeRole in interface RolesUpdate<String>
        Parameters:
        role - role to remove
      • removeGroup

        public void removeGroup​(@NotNull
                                String id)
      • clearCaches

        public void clearCaches​(@Nullable
                                String id)