Class ACE

    • Field Detail

      • BLOCK

        public static final ACE BLOCK
        An ACE that blocks all permissions for everyone.
        Since:
        6.0
      • ID_PATTERN

        protected static final Pattern ID_PATTERN
    • Constructor Detail

      • ACE

        public ACE()
      • ACE

        public ACE​(String username,
                   String permission,
                   boolean isGranted)
        Constructs an ACE for a given username and permission, and specifies whether to grant or deny it.
      • ACE

        public ACE​(String username,
                   String permission)
        Constructs an ACE for a given username and permission.

        The ACE is granted.

        Since:
        6.0
    • Method Detail

      • fromId

        public static ACE fromId​(String aceId)
        Create an ACE from an id.
        Since:
        7.4
      • getId

        public String getId()
        Returns this ACE id.

        This id is unique inside a given ACL.

        Since:
        7.4
      • getUsername

        public String getUsername()
      • getPermission

        public String getPermission()
      • isGranted

        public boolean isGranted()
        Checks if this privilege is granted.
        Returns:
        true if the privilege is granted
      • isDenied

        public boolean isDenied()
        Checks if this privilege is denied.
        Returns:
        true if privilege is denied
      • setBegin

        public void setBegin​(Calendar begin)
        Sets the begin date of this ACE.

        Sets the Calendar.MILLISECOND part of the Calendar to 0.

      • setEnd

        public void setEnd​(Calendar end)
        Sets the end date of this ACE.

        Sets the Calendar.MILLISECOND part of the Calendar to 0.

      • getCreator

        public String getCreator()
      • setCreator

        public void setCreator​(String creator)
      • getStatus

        public ACE.Status getStatus()
        Returns the status of this ACE.
        Since:
        7.4
      • getLongStatus

        public Long getLongStatus()
        Returns a Long value of this ACE status.

        It returns null if there is no begin and end date, which means the ACE is effective. Otherwise, it returns 0 for PENDING, 1 for EFFECTIVE and 2 for ARCHIVED.

        Since:
        7.4
      • isEffective

        public boolean isEffective()
      • isPending

        public boolean isPending()
      • isArchived

        public boolean isArchived()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object