summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/acls/ACL.java')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/ACL.java67
1 files changed, 32 insertions, 35 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACL.java b/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
index 476bd793c..5c0c55c61 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
@@ -17,19 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
+
import java.util.Enumeration;
import java.util.Vector;
+
/**
- * A class represents an access control list (ACL). An ACL is associated with an
- * protected resources. The policy enforcer can verify the ACLs with the current
- * context to see if the corresponding resource is accessible.
+ * A class represents an access control list (ACL). An ACL
+ * is associated with an protected resources. The policy
+ * enforcer can verify the ACLs with the current
+ * context to see if the corresponding resource is accessible.
* <P>
- * An <code>ACL</code> may contain one or more <code>ACLEntry</code>. However,
- * in case of multiple <code>ACLEntry</code>, a subject must pass ALL of the
- * <code>ACLEntry</code> evaluation for permission to be granted
+ * An <code>ACL</code> may contain one or more <code>ACLEntry</code>.
+ * However, in case of multiple <code>ACLEntry</code>, a subject must
+ * pass ALL of the <code>ACLEntry</code> evaluation for permission
+ * to be granted
* <P>
- *
* @version $Revision$, $Date$
*/
public class ACL implements IACL, java.io.Serializable {
@@ -40,8 +43,7 @@ public class ACL implements IACL, java.io.Serializable {
private static final long serialVersionUID = -1867465948611161868L;
protected Vector mEntries = new Vector(); // ACL entries
protected Vector mRights = null; // possible rights entries
- protected String mResourceACLs = null; // exact resourceACLs string on ldap
- // server
+ protected String mResourceACLs = null; // exact resourceACLs string on ldap server
protected String mName = null; // resource name
protected String mDescription = null; // resource description
@@ -52,15 +54,17 @@ public class ACL implements IACL, java.io.Serializable {
}
/**
- * Class constructor. Constructs an access control list associated with a
- * resource name
- *
+ * Class constructor.
+ * Constructs an access control list associated
+ * with a resource name
* @param name resource name
* @param rights applicable rights defined for this resource
* @param resourceACLs the entire ACL specification. For example:
- * "certServer.log.configuration:read,modify: allow (read,modify)
- * group=\"Administrators\": Allow administrators to read and
- * modify log configuration"
+ * "certServer.log.configuration:read,modify:
+ * allow (read,modify)
+ * group=\"Administrators\":
+ * Allow administrators to read and modify log
+ * configuration"
*/
public ACL(String name, Vector rights, String resourceACLs) {
setName(name);
@@ -74,17 +78,17 @@ public class ACL implements IACL, java.io.Serializable {
}
/**
- * Sets the name of the resource governed by this access control.
- *
+ * Sets the name of the resource governed by this
+ * access control.
* @param name name of the resource
*/
public void setName(String name) {
mName = name;
}
-
+
/**
- * Retrieves the name of the resource governed by this access control.
- *
+ * Retrieves the name of the resource governed by
+ * this access control.
* @return name of the resource
*/
public String getName() {
@@ -93,7 +97,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Retrieves the exact string of the resourceACLs
- *
* @return resource's acl
*/
public String getResourceACLs() {
@@ -101,18 +104,17 @@ public class ACL implements IACL, java.io.Serializable {
}
/**
- * Sets the description of the resource governed by this access control.
- *
+ * Sets the description of the resource governed by this
+ * access control.
* @param description Description of the protected resource
*/
public void setDescription(String description) {
mDescription = description;
}
-
+
/**
- * Retrieves the description of the resource governed by this access
- * control.
- *
+ * Retrieves the description of the resource governed by
+ * this access control.
* @return Description of the protected resource
*/
public String getDescription() {
@@ -121,7 +123,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Adds an ACL entry to this list.
- *
* @param entry the <code>ACLEntry</code> to be added to this resource
*/
public void addEntry(ACLEntry entry) {
@@ -130,7 +131,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns ACL entries.
- *
* @return enumeration for the <code>ACLEntry</code> vector
*/
public Enumeration entries() {
@@ -139,9 +139,9 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns the string reprsentation.
- *
- * @return the string representation of the ACL entries in the following
- * format: <resource name>[<ACLEntry1>,<ACLEntry 2>,...<ACLEntry N>]
+ * @return the string representation of the ACL entries in the
+ * following format:
+ * <resource name>[<ACLEntry1>,<ACLEntry 2>,...<ACLEntry N>]
*/
public String toString() {
String entries = "";
@@ -159,7 +159,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Adds an rights entry to this list.
- *
* @param right The right to be added for this ACL
*/
public void addRight(String right) {
@@ -168,7 +167,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Tells if the permission is one of the defined "rights"
- *
* @param permission permission to be checked
* @return true if it's one of the "rights"; false otherwise
*/
@@ -178,7 +176,6 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns rights entries.
- *
* @return enumeration of rights defined for this ACL
*/
public Enumeration rights() {