Class Permissions

java.lang.Object
org.genesys.blocks.security.serialization.Permissions
Direct Known Subclasses:
SidPermissions

public class Permissions extends Object
A simple POJO for object permissions.
  • Field Details

    • create

      public boolean create
      Allowed to create.
    • read

      public boolean read
      Allowed to read.
    • write

      public boolean write
      Allowed to write/modify.
    • delete

      public boolean delete
      Allowed to delete.
    • manage

      public boolean manage
      Allowed to admin/manage.
    • isPublic

      public boolean isPublic
      Anyone is allowed to read the object
  • Constructor Details

    • Permissions

      public Permissions()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isGranting

      public boolean isGranting(int mask)
      Is Permissions granting the BasePermission by its mask?.
      Parameters:
      mask - int mask value of a single Permission
      Returns:
      true if granting, false otherwise
      Throws:
      UnsupportedOperationException - if mask is not understood
    • grantAll

      public Permissions grantAll()
      Grant all.
      Returns:
      the permissions
    • grantNone

      public Permissions grantNone()
      Grant none.
      Returns:
      the permissions
    • isOneGranting

      public boolean isOneGranting()
      Checks if is one granting.
      Returns:
      true, if is one granting