Interface IPermission

All Known Implementing Classes:
AdministrationPermission, ChangePasswordPermission, DownloadFromBIRPermission, LoginPermission, Permission, ReportPermission, UserManagementPermission

public interface IPermission
The permission interface.

Implementations must be based on Permission.

Author:
dobisekm
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Separator of permission name components
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the collection of role IDs of dynamic roles associated with this particular permission.
    The permission's name.
    The collection of permissions, to which the decision about this permission is granted, if there is no record for exactly this permission.
    isInCustomSet(String customSet)
    Checks if the permission of the concrete object is in the provided custom set.
  • Field Details

  • Method Details

    • getName

      @NotNull String getName()
      The permission's name. Permission names are typically dot '.' separated series of strings (e.g. as packege+class names).
      Returns:
      The name, never null.
    • getParentPermissions

      @NotNull IPermission[] getParentPermissions()
      The collection of permissions, to which the decision about this permission is granted, if there is no record for exactly this permission.

      For permission to be granted, none of it's parents can be denied and at least one of them must be granted. The rest can be either undefined or granted.

      Returns:
      array of IPermissions (not null)
    • getDynamicRoles

      @NotNull Collection<String> getDynamicRoles(@Nullable String user)
      Returns the collection of role IDs of dynamic roles associated with this particular permission.

      Dynamic roles are determined by particular permission data and by the relationship between the data and the user. The permission is allowed to perform operations which may lead to the test of the same permission - clients of this method must be aware of it.

      Parameters:
      user - name of current user
      Returns:
      Empty Collection if there are no dynamic roles, or collection of String role Ids.
    • isInCustomSet

      @Nullable Boolean isInCustomSet(@Nullable String customSet)
      Checks if the permission of the concrete object is in the provided custom set. A custom set is a Lucene query which groups a permission to all objects satisfying the query.
      Parameters:
      customSet - - the custom set (Lucene query syntax)
      Returns:
      true if the IPObject inside the permission satisfies the query (belongs to that customSet), false if custom set is null or object does not belong to the custom set. null if the caller should assume that the information cannot be determined
      Since:
      3.8.1