org.persvr.security
Class CapabilityObject
java.lang.Object
NativeObject
org.persvr.data.PersistableObject
org.persvr.security.CapabilityObject
- All Implemented Interfaces:
- java.security.acl.Permission, ObservablePersistable, Persistable, Capability
- Direct Known Subclasses:
- CapabilityUser
public class CapabilityObject
- extends PersistableObject
- implements Capability
|
Method Summary |
int |
getPermissionLevel(Persistable obj)
Determines whether this capability can access the given object |
static java.lang.Integer |
getPermissionLevelForString(java.lang.String name)
|
void |
grantCapability(Capability capability)
Grants a new capability to this capability |
void |
grantCapability(Persistable persistable)
Grants a new capability to this capability |
void |
grantCapability(Persistable persistable,
java.lang.String levelName)
|
boolean |
hasPermission(java.security.acl.Permission permision)
Determines whether this capability has the given system permission |
void |
onCreation()
Called when an persistent object is first created (not when the Java object is created to restore state) |
void |
put(java.lang.String name,
Scriptable start,
java.lang.Object obj)
|
java.lang.Object |
set(java.lang.String name,
java.lang.Object value)
Sets a value into a field persistently (even it has been declared persistent in the structure) without using JS setters |
| Methods inherited from class org.persvr.data.PersistableObject |
addListener, checkPut, checkSecurity, commitPut, computeAccessLevel, convertToDateJavaDate, delete, delete, enableSecurity, entrySet, get, get, get, get, getAccessLevel, getCoreValue, getHistory, getId, getIds, getLastModified, getParent, getPermissionObject, getReadSet, getSchema, getWatchSet, initArray, initializeProperty, initObject, isSecurityEnabled, keySet, noCheckGet, put, recordObjectRead, removeListener, resetComputedPermissions, startReadSet, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.security.acl.Permission |
equals, toString |
WRITE_ACCESS
public static int WRITE_ACCESS
FULL_ACCESS
public static int FULL_ACCESS
CapabilityObject
public CapabilityObject()
getPermissionLevel
public int getPermissionLevel(Persistable obj)
- Description copied from interface:
Capability
- Determines whether this capability can access the given object
- Specified by:
getPermissionLevel in interface Capability
- Returns:
getPermissionLevelForString
public static java.lang.Integer getPermissionLevelForString(java.lang.String name)
put
public void put(java.lang.String name,
Scriptable start,
java.lang.Object obj)
- Overrides:
put in class PersistableObject
set
public java.lang.Object set(java.lang.String name,
java.lang.Object value)
- Description copied from interface:
Persistable
- Sets a value into a field persistently (even it has been declared persistent in the structure) without using JS setters
- Specified by:
set in interface Persistable- Overrides:
set in class PersistableObject
- Returns:
grantCapability
public void grantCapability(Capability capability)
- Description copied from interface:
Capability
- Grants a new capability to this capability
- Specified by:
grantCapability in interface Capability
grantCapability
public void grantCapability(Persistable persistable,
java.lang.String levelName)
grantCapability
public void grantCapability(Persistable persistable)
- Description copied from interface:
Capability
- Grants a new capability to this capability
- Specified by:
grantCapability in interface Capability
hasPermission
public boolean hasPermission(java.security.acl.Permission permision)
- Description copied from interface:
Capability
- Determines whether this capability has the given system permission
- Specified by:
hasPermission in interface Capability
- Returns:
onCreation
public void onCreation()
- Description copied from interface:
Persistable
- Called when an persistent object is first created (not when the Java object is created to restore state)
- Specified by:
onCreation in interface Persistable- Overrides:
onCreation in class PersistableObject