Interface SystemPermissionSet

All Superinterfaces:
PermissionSet<SystemPermission>
All Known Implementing Classes:
SimpleSystemPermissionSet

public interface SystemPermissionSet extends PermissionSet<SystemPermission>
A set of permissions which affects the system as a whole.
  • Field Details

    • EMPTY_SET

      static final SystemPermissionSet EMPTY_SET
      An immutable instance of SystemPermissionSet which contains no permissions.
  • Method Details

    • hasPermission

      boolean hasPermission(SystemPermission.Type permission) throws org.apache.guacamole.GuacamoleException
      Tests whether the permission of the given type is granted.
      Parameters:
      permission - The permission to check.
      Returns:
      true if the permission is granted, false otherwise.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while checking permissions, or if permissions cannot be checked due to lack of permissions to do so.
    • addPermission

      void addPermission(SystemPermission.Type permission) throws org.apache.guacamole.GuacamoleException
      Adds the specified permission.
      Parameters:
      permission - The permission to add.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while adding the permission, or if permission to add permissions is denied.
    • removePermission

      void removePermission(SystemPermission.Type permission) throws org.apache.guacamole.GuacamoleException
      Removes the specified permission.
      Parameters:
      permission - The permission to remove.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while removing the permission, or if permission to remove permissions is denied.
    • getPermissions

      Set<SystemPermission> getPermissions() throws org.apache.guacamole.GuacamoleException
      Description copied from interface: PermissionSet
      Returns a Set which contains all permissions granted within this permission set.
      Specified by:
      getPermissions in interface PermissionSet<SystemPermission>
      Returns:
      A Set containing all permissions granted within this permission set.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while retrieving permissions, or if permissions cannot be retrieved due to lack of permissions to do so.
    • addPermissions

      void addPermissions(Set<SystemPermission> permissions) throws org.apache.guacamole.GuacamoleException
      Description copied from interface: PermissionSet
      Adds the specified permissions, if not already granted. If a specified permission is already granted, no operation is performed regarding that permission.
      Specified by:
      addPermissions in interface PermissionSet<SystemPermission>
      Parameters:
      permissions - The permissions to add.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while adding the permissions, or if permission to add permissions is denied.
    • removePermissions

      void removePermissions(Set<SystemPermission> permissions) throws org.apache.guacamole.GuacamoleException
      Description copied from interface: PermissionSet
      Removes each of the specified permissions, if granted. If a specified permission is not granted, no operation is performed regarding that permission.
      Specified by:
      removePermissions in interface PermissionSet<SystemPermission>
      Parameters:
      permissions - The permissions to remove.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while removing the permissions, or if permission to remove permissions is denied.