summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/acls
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-10-31 21:35:49 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-11-01 14:55:32 -0400
commit481ee45823a6dd1d3d151f407eb78e142e7149fa (patch)
treef63f299133e15724f843e100a55db09b3eb33a68 /base/common/src/com/netscape/certsrv/acls
parentf2f7f50e24f1f2d051bd8352b413946df9600ce6 (diff)
downloadpki-481ee45823a6dd1d3d151f407eb78e142e7149fa.tar.gz
pki-481ee45823a6dd1d3d151f407eb78e142e7149fa.tar.xz
pki-481ee45823a6dd1d3d151f407eb78e142e7149fa.zip
Removed duplicate ACL classes.
The ACL and ACLEntry in com.netscape.cmscore.realm are duplicates of the ones in com.netscape.certsrv.acls. They have been removed since they are no longer used. All differences have been merged into the remaining copy.
Diffstat (limited to 'base/common/src/com/netscape/certsrv/acls')
-rw-r--r--base/common/src/com/netscape/certsrv/acls/ACL.java42
-rw-r--r--base/common/src/com/netscape/certsrv/acls/ACLEntry.java18
2 files changed, 30 insertions, 30 deletions
diff --git a/base/common/src/com/netscape/certsrv/acls/ACL.java b/base/common/src/com/netscape/certsrv/acls/ACL.java
index 83be047e7..292be4cdd 100644
--- a/base/common/src/com/netscape/certsrv/acls/ACL.java
+++ b/base/common/src/com/netscape/certsrv/acls/ACL.java
@@ -39,11 +39,11 @@ public class ACL implements IACL, java.io.Serializable {
*/
private static final long serialVersionUID = -1867465948611161868L;
- protected Vector<ACLEntry> mEntries = new Vector<ACLEntry>(); // ACL entries
- protected Vector<String> mRights = null; // possible rights entries
- protected String mResourceACLs = null; // exact resourceACLs string on ldap server
- protected String mName = null; // resource name
- protected String mDescription = null; // resource description
+ protected Vector<ACLEntry> entries = new Vector<ACLEntry>(); // ACL entries
+ protected Vector<String> rights = null; // possible rights entries
+ protected String resourceACLs = null; // exact resourceACLs string on ldap server
+ protected String name = null; // resource name
+ protected String description = null; // resource description
/**
* Class constructor.
@@ -68,11 +68,11 @@ public class ACL implements IACL, java.io.Serializable {
public ACL(String name, Vector<String> rights, String resourceACLs) {
setName(name);
if (rights != null) {
- mRights = rights;
+ this.rights = rights;
} else {
- mRights = new Vector<String>();
+ this.rights = new Vector<String>();
}
- mResourceACLs = resourceACLs;
+ this.resourceACLs = resourceACLs;
}
@@ -83,7 +83,7 @@ public class ACL implements IACL, java.io.Serializable {
* @param name name of the resource
*/
public void setName(String name) {
- mName = name;
+ this.name = name;
}
/**
@@ -93,7 +93,7 @@ public class ACL implements IACL, java.io.Serializable {
* @return name of the resource
*/
public String getName() {
- return mName;
+ return name;
}
/**
@@ -102,7 +102,7 @@ public class ACL implements IACL, java.io.Serializable {
* @return resource's acl
*/
public String getResourceACLs() {
- return mResourceACLs;
+ return resourceACLs;
}
/**
@@ -112,7 +112,7 @@ public class ACL implements IACL, java.io.Serializable {
* @param description Description of the protected resource
*/
public void setDescription(String description) {
- mDescription = description;
+ this.description = description;
}
/**
@@ -122,7 +122,7 @@ public class ACL implements IACL, java.io.Serializable {
* @return Description of the protected resource
*/
public String getDescription() {
- return mDescription;
+ return description;
}
/**
@@ -131,7 +131,7 @@ public class ACL implements IACL, java.io.Serializable {
* @param entry the <code>ACLEntry</code> to be added to this resource
*/
public void addEntry(ACLEntry entry) {
- mEntries.addElement(entry);
+ entries.addElement(entry);
}
/**
@@ -140,7 +140,7 @@ public class ACL implements IACL, java.io.Serializable {
* @return enumeration for the <code>ACLEntry</code> vector
*/
public Enumeration<ACLEntry> entries() {
- return mEntries.elements();
+ return entries.elements();
}
/**
@@ -151,17 +151,17 @@ public class ACL implements IACL, java.io.Serializable {
* <resource name>[<ACLEntry1>,<ACLEntry 2>,...<ACLEntry N>]
*/
public String toString() {
- StringBuffer entries = new StringBuffer();
+ StringBuilder entries = new StringBuilder();
Enumeration<ACLEntry> e = entries();
for (; e.hasMoreElements();) {
ACLEntry entry = e.nextElement();
- entries.append(entry.toString());
+ entries.append(entry);
if (e.hasMoreElements())
entries.append(",");
}
- return getName() + "[" + entries.toString() + "]";
+ return getName() + "[" + entries + "]";
}
/**
@@ -170,7 +170,7 @@ public class ACL implements IACL, java.io.Serializable {
* @param right The right to be added for this ACL
*/
public void addRight(String right) {
- mRights.addElement(right);
+ rights.addElement(right);
}
/**
@@ -180,7 +180,7 @@ public class ACL implements IACL, java.io.Serializable {
* @return true if it's one of the "rights"; false otherwise
*/
public boolean checkRight(String permission) {
- return mRights.contains(permission);
+ return rights.contains(permission);
}
/**
@@ -189,6 +189,6 @@ public class ACL implements IACL, java.io.Serializable {
* @return enumeration of rights defined for this ACL
*/
public Enumeration<String> rights() {
- return mRights.elements();
+ return rights.elements();
}
}
diff --git a/base/common/src/com/netscape/certsrv/acls/ACLEntry.java b/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
index ca08fb551..23f859627 100644
--- a/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
+++ b/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
@@ -34,9 +34,9 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
private static final long serialVersionUID = 422656406529200393L;
protected Hashtable<String, String> mPerms = new Hashtable<String, String>();
- protected String mExpressions = null;
- protected boolean mNegative = false;
- protected String mACLEntryString = null;
+ protected String expressions = null;
+ protected boolean negative = false;
+ protected String aclEntryString = null;
/**
* Class Constructor
@@ -51,14 +51,14 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
* false if this ACL entry expression is for "allow"
*/
public boolean isNegative() {
- return mNegative;
+ return negative;
}
/**
* Sets this ACL entry negative. This ACL entry expression is for "deny".
*/
public void setNegative() {
- mNegative = true;
+ negative = true;
}
/**
@@ -71,7 +71,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
* </PRE>
*/
public void setACLEntryString(String s) {
- mACLEntryString = s;
+ aclEntryString = s;
}
/**
@@ -84,7 +84,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
* </PRE>
*/
public String getACLEntryString() {
- return mACLEntryString;
+ return aclEntryString;
}
/**
@@ -120,7 +120,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
* group="Administrators"
*/
public void setAttributeExpressions(String expressions) {
- mExpressions = expressions;
+ this.expressions = expressions;
}
/**
@@ -130,7 +130,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
* group="Administrators"
*/
public String getAttributeExpressions() {
- return mExpressions;
+ return expressions;
}
/**