|
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.Capability
Base class for capabilities in the system. A "capability" in the context of Bees is an object with the following attributes:
Field Summary | |
static Permission |
DELETE_PERMISSION
Permission to delete a capability. |
protected long |
id
The unique kernel object store identifier for this capability. |
static long |
INVALID_ID
An invalid capability identifier. |
Constructor Summary | |
protected |
Capability()
Construct an empty capability. |
Method Summary | |
void |
checkPermission(Permission what)
Check if this capability has the permissions to do something. |
protected void |
clear()
Clear the internal bits binding this capability to the kernel object. |
Permission |
clonePermission(Permission what)
|
void |
deleteCapability()
Delete a capability. |
boolean |
equals(java.lang.Object obj)
|
protected void |
fromBytes(byte[] flattened)
Bind this capability to the given object. |
protected void |
fromBytes(byte[] flattened,
CapabilityEnvelope[] sub)
Bind this capability to the given object. |
void |
revoke()
Revoke access to the capability. |
void |
revokedPermission(Permission what)
Callback... |
void |
revokePermission(Permission what)
|
void |
revokePermissions(PermissionSet ps)
|
java.lang.String |
toString()
|
protected boolean |
valid()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Permission DELETE_PERMISSION
public static final long INVALID_ID
protected long id
Constructor Detail |
protected Capability()
Method Detail |
protected void clear()
protected final boolean valid()
protected void fromBytes(byte[] flattened) throws java.lang.Exception
flattened
- The object this capability gives access too.java.lang.Exception
- if anything goes wrong during initialization.protected void fromBytes(byte[] flattened, CapabilityEnvelope[] sub) throws java.lang.Exception
flattened
- The object this capability gives access too.sub
- Null or any sub-capabilities.java.lang.Exception
- if anything goes wrong during initialization.public void revoke()
public final void checkPermission(Permission what) throws PermissionException
what
- The permission to check for.PermissionException
- if the capability doesn't
has the permission.public final Permission clonePermission(Permission what) throws PermissionException
what
- The permission to clone.PermissionException
- if the capability doesn't
has the permission.public final void revokePermission(Permission what)
what
- The Permission to revoke.public final void revokePermissions(PermissionSet ps)
ps
- The set of Permissions to revoke.public void revokedPermission(Permission what)
public final void deleteCapability()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
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 |