org.appng.api

## Interface PermissionProcessor

- All Known Implementing Classes:
    DefaultPermissionProcessor, DummyPermissionProcessor

      public interface PermissionProcessor

  Checks the `Permission`s owned by a `PermissionOwner`.
  Author:
    Matthias Müller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasPermission(String reference)` Checks whether the `Permission` identified by the given `reference` is present.
    `boolean` | `hasPermissions(PermissionOwner permissionOwner)` Checks whether all of the `PermissionOwner`s `Permission`s are present.
    `boolean` | `hasReadPermission(FieldDef fieldDefinition)` Checks whether the `Permission`s to read the value for the given `FieldDef` are present.
    `boolean` | `hasWritePermission(FieldDef fieldDefinition)` Checks whether the `Permission`s to write the value for the given `FieldDef` are present.

- - ### Method Detail

    - #### hasPermissions

          boolean hasPermissions(PermissionOwner permissionOwner)

      Checks whether all of the `PermissionOwner`s `Permission`s are present.
      Parameters:
        `permissionOwner` - the `PermissionOwner`
      Returns:
        `true` if all permissions are present, `false` otherwise

    - #### hasPermission

          boolean hasPermission(String reference)

      Checks whether the `Permission` identified by the given `reference` is present.
      Parameters:
        `reference` - the name of the `Permission` to check
      Returns:
        `true` if the permission is present, `false` otherwise
      See Also:
        `Permission.getRef()`

    - #### hasWritePermission

          boolean hasWritePermission(FieldDef fieldDefinition)

      Checks whether the `Permission`s to write the value for the given `FieldDef` are present.
      Parameters:
        `fieldDefinition` - the `FieldDef` to check the write-permission for
      Returns:
        `true` if the permissions are present and the `FieldDef` isn't readonly, `false` otherwise
      See Also:
        `FieldDef.getReadonly()`, `FieldPermissions`, `FieldPermissionType.WRITE`

    - #### hasReadPermission

          boolean hasReadPermission(FieldDef fieldDefinition)

      Checks whether the `Permission`s to read the value for the given `FieldDef` are present.
      Parameters:
        `fieldDefinition` - the `FieldDef` to check the read-permission for
      Returns:
        `true` if the permissions are present, `false` otherwise
      See Also:
        `FieldPermissions`, `FieldPermissionType.READ`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.