Class ACLEntry

java.lang.Object
com.netscape.certsrv.acls.ACLEntry
All Implemented Interfaces:
Serializable

public class ACLEntry extends Object implements Serializable
A class represents an ACI entry of an access control list.
See Also:
  • Field Details

  • Method Details

    • getType

      public ACLEntry.Type getType()
      Get the Type of the ACL entry.
      Returns:
      ALLOW or DENY
    • setACLEntryString

      public void setACLEntryString(String s)
      Sets the ACL entry string
      Parameters:
      s - string in the following format:
         allow|deny (right[,right...]) attribute_expression
       
    • getACLEntryString

      public String getACLEntryString()
      Gets the ACL Entry String
      Returns:
      ACL Entry string in the following format:
         allow|deny (right[,right...]) attribute_expression
       
    • addPermission

      public void addPermission(ACL acl, String permission)
      Adds permission to this entry. Permission must be one of the "rights" defined for each protected resource in its ACL
      Parameters:
      acl - the acl instance that this aclEntry is associated with
      permission - one of the "rights" defined for each protected resource in its ACL
    • permissions

      public Enumeration<String> permissions()
      Returns a list of permissions associated with this entry.
      Returns:
      a list of permissions for this ACL entry
    • setAttributeExpressions

      public void setAttributeExpressions(String expressions)
      Sets the expression associated with this entry.
      Parameters:
      expressions - the evaluator expressions. For example, group="Administrators"
    • getAttributeExpressions

      public String getAttributeExpressions()
      Retrieves the expression associated with this entry.
      Returns:
      the evaluator expressions. For example, group="Administrators"
    • containPermission

      public boolean containPermission(String permission)
      Checks to see if this ACLEntry contains a particular permission
      Parameters:
      permission - one of the "rights" defined for each protected resource in its ACL
      Returns:
      true if permission contained in the permission list for this ACLEntry; false otherwise.
    • checkPermission

      public boolean checkPermission(String permission)
      Checks if this entry has the given permission.
      Parameters:
      permission - one of the "rights" defined for each protected resource in its ACL
      Returns:
      true if the permission is allowed; false if the permission is denied. If a permission is not recognized by this ACL, it is considered denied
    • parseACLEntry

      public static ACLEntry parseACLEntry(ACL acl, String aclEntryString)
      Parse string in the following format:
         allow|deny (right[,right...]) attribute_expression
       
      into an instance of the ACLEntry class
      Parameters:
      acl - the acl instance associated with this aclentry
      aclEntryString - aclEntryString in the specified format
      Returns:
      an instance of the ACLEntry class
    • toString

      public String toString()
      Returns the string representation of this ACLEntry
      Overrides:
      toString in class Object
      Returns:
      string representation of this ACLEntry