Class Permissions

  • Direct Known Subclasses:
    SidPermissions

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

      • 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 Detail

      • Permissions

        public Permissions()
    • Method Detail

      • isGranting

        public boolean isGranting​(int mask)
        Is Permissions granting the BasePermission by its mask?.
        Parameters:
        mask - int value of Permission mask
        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