Interface RepositoryPermissionHolder

All Known Implementing Classes:
Namespace, Repository

public interface RepositoryPermissionHolder
This abstracts the permissions of Repository and Namespace objects.
  • Method Details

    • getPermissions

      Collection<RepositoryPermission> getPermissions()
      Returns a collection of all permissions for this object.
    • setPermissions

      void setPermissions(Collection<RepositoryPermission> permissions)
      Sets and therefore overwrites the permissions for this object.
      Parameters:
      permissions - The new permissions for this object.
    • addPermission

      void addPermission(RepositoryPermission newPermission)
      Adds a single permission to the current set of permissions for this object.
      Parameters:
      newPermission - The new permission that will be added to the existing permissions.
    • removePermission

      boolean removePermission(RepositoryPermission permission)
      Removes a single permission from the current set of permissions for this object.
      Parameters:
      permission - The permission that should be removed from the existing permissions.
      Returns:
      true, if the given permission was part of the permissions for this object, false otherwise.
    • findUserPermission

      default Optional<RepositoryPermission> findUserPermission(String userId)
      Returns the permission for the given user, if present, or an empty Optional otherwise.
      Since:
      2.38.0
    • findGroupPermission

      default Optional<RepositoryPermission> findGroupPermission(String groupId)
      Returns the permission for the given group, if present, or an empty Optional otherwise.
      Since:
      2.38.0