Methods Summary |
---|
public boolean | addPermission(Permission permission)
if(permissionSet.contains(permission)) {
return false;
} else {
permissionSet.addElement(permission);
return true;
}
|
public boolean | checkPermission(Permission permission)
return permissionSet.contains(permission);
|
public synchronized java.lang.Object | clone()
AclEntryImpl aclentryimpl = new AclEntryImpl(user);
aclentryimpl.permissionSet = (Vector)permissionSet.clone();
aclentryimpl.negative = negative;
return aclentryimpl;
|
public java.security.Principal | getPrincipal()
return user;
|
public boolean | isNegative()
return negative;
|
public java.util.Enumeration | permissions()
return permissionSet.elements();
|
public boolean | removePermission(Permission permission)
return permissionSet.removeElement(permission);
|
public void | setNegativePermissions()
negative = true;
|
public boolean | setPrincipal(java.security.Principal principal)
if(user != null) {
return false;
} else {
user = principal;
return true;
}
|
public java.lang.String | toString()
StringBuffer stringbuffer = new StringBuffer();
if(negative)
stringbuffer.append("-");
else
stringbuffer.append("+");
if(user instanceof Group)
stringbuffer.append("Group.");
else
stringbuffer.append("User.");
stringbuffer.append((new StringBuilder()).append(user).append("=").toString());
Enumeration enumeration = permissions();
do {
if(!enumeration.hasMoreElements())
break;
Permission permission = (Permission)enumeration.nextElement();
stringbuffer.append(permission);
if(enumeration.hasMoreElements())
stringbuffer.append(",");
} while(true);
return new String(stringbuffer);
|