|
Bees v0.5.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bees.core.security.PermissionSet
A PermissionSet holds a list of permissions and provides a number of methods for manipulating them.
Constructor Summary | |
PermissionSet()
Construct an empty PermissionSet. |
|
PermissionSet(Permission[] permissions)
Construct a PermissionSet with the given value. |
|
PermissionSet(PermissionSet[] ps)
Construct a PermissionSet from the given value. |
|
PermissionSet(java.util.Vector permissions)
Construct a PermissionSet from the given value. |
Method Summary | |
void |
boundPermissions(PermissionSet ps)
Bound the Permissions in this set to the ones in the given set. |
void |
checkPermission(Permission what)
Check if this set has the given Permission and throw a PermissionException if it doesn't. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
void |
grantPermission(Permission what)
Grant the given Permission to this set. |
void |
grantPermissions(PermissionSet ps)
Grant all of the Permissions in the given set to this set. |
Permission |
hasPermission(Permission what)
Check if this set has the given Permission. |
static PermissionSet |
instantiate(byte[] flattened)
Instantiate a Permission object from the given byte array. |
static PermissionSet |
instantiate(XdrByteArray xdr)
Instantiate a Permission object from the given byte array. |
void |
marshal(XdrByteArray xdr)
Marshal this object into the given byte array. |
int |
marshalledLength()
|
void |
revokePermission(Permission what)
Revoke the given Permission from this set. |
void |
revokePermissions(PermissionSet ps)
Revoke all of the Permissions in the given set from this set. |
PermissionSet |
subset(Permission what)
|
Permission[] |
toArray()
|
byte[] |
toBytes()
|
java.lang.String |
toString()
|
void |
updateHash(bees.util.MD5 digest)
Update an MD5 hash value with the contents of this set. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PermissionSet(Permission[] permissions)
permissions
- The permissions that should be included in this set.public PermissionSet(java.util.Vector permissions)
permissions
- A Vector containing Permission objects that should be
wrapped by this set.public PermissionSet(PermissionSet[] ps)
ps
- An array of PermissionSet's whose elements should make up this
set.public PermissionSet()
Method Detail |
public Permission[] toArray()
public void grantPermission(Permission what)
what
- The Permission to grant.public void grantPermissions(PermissionSet ps)
ps
- The set of permissions to grant to this one.public void revokePermission(Permission what)
what
- The Permission to revoke from this set.public void revokePermissions(PermissionSet ps)
ps
- The set of permissions to revoke from this one.public void boundPermissions(PermissionSet ps)
ps
- The set of permissions to bound this set to.public PermissionSet subset(Permission what)
public Permission hasPermission(Permission what)
what
- The permission to check for.public void checkPermission(Permission what)
what
- The permission to check for.public void updateHash(bees.util.MD5 digest)
digest
- The MD5 object to update.public int marshalledLength()
public void marshal(XdrByteArray xdr)
xdr
- The destination for the flattened version of this set.public static PermissionSet instantiate(XdrByteArray xdr)
xdr
- The source of the flattened version of a set.public static PermissionSet instantiate(byte[] flattened)
flattened
- The source of the flattened version of a set.public byte[] toBytes()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
Bees v0.5.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |