|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.kernel.permissions.PermissionManager
default implementation of PermissionService.
PermissionService| Field Summary | |
static int |
SYSTEM_PARTY
|
static int |
VIRTUAL_PUBLIC_ID
|
static int |
VIRTUAL_REGISTERED_ID
|
| Constructor Summary | |
PermissionManager()
|
|
| Method Summary | |
OID |
checkOID(OID oid)
this takes in an OID and returns the public OID if the passed in value is null. |
boolean |
checkPermission(PermissionDescriptor permission)
Checks the permission represented by the passed in PermissionDescriptor. |
void |
clonePermissions(ACSObject acsObject)
Adds explicit permissions to the object specified by acsObjectOID to all permissions currently inherited from its permission context and resets the permissions context to null. |
void |
clonePermissions(OID acsObjectOID)
Adds explicit permissions to the object specified by acsObjectOID to all permissions currently inherited from its permission context and resets the permissions context to null. |
static Collection |
constructAccessList(OID partyOID)
Deprecated. this is slower than using "normal" permission checks since "in ("") transformed into union by Oracle SQL Optimizer |
void |
filterObjects(DataCollection dataCollection,
PrivilegeDescriptor privilege,
OID partyOID)
Filters a data collection to include only those objects that the specified party has the specified privilege on. |
void |
filterQuery(DataQuery dataQuery,
String propertyName,
PrivilegeDescriptor privilege,
OID partyOID)
Filters a data query to include only those results where the specified party has the specified privilege on the ACSObject identified by the specified property name. |
DataObject |
getContext(ACSObject acsObject)
Returns the data object that serves as the permission context of the specified ACS object. |
DataObject |
getContext(OID oid)
Returns the data object that serves as the permission context of the ACS object specified by OID. |
Filter |
getFilterQuery(FilterFactory factory,
String propertyName,
PrivilegeDescriptor privilege,
OID partyOID)
Returns a Filter to include only those results where the specified party has the specified privilege on the ACSObject identified by the specified property name. |
ObjectPermissionCollection |
getGrantedPermissions(OID acsObjectOID)
Returns the set of permissions that have been granted on the specified object, including those inherited from the object's permission context. |
ObjectPermissionCollection |
getGrantedUniversalPermissions()
Returns the set of permissions that have been granted universally. |
Iterator |
getImpliedPrivileges(OID object,
OID party)
Gets all the privileges that the specified party has on the specified object, including implied privileges. |
Filter |
getObjectFilterQuery(FilterFactory factory,
String propertyName,
PrivilegeDescriptor privilege,
OID objectOID)
|
Iterator |
getPrivileges(OID object,
OID party)
Gets the privileges that the specified party has on the specified object. |
void |
grantPermission(PermissionDescriptor permission)
Grants the permission as specified by the PermissionDescriptor parameters. |
void |
revokePermission(PermissionDescriptor permission)
Revokes the permission that is specified by the passed in PermissionDescriptor. |
void |
setContext(ACSObject acsObject,
ACSObject context)
Sets the permission context of the object specified by acsObject to the object specified by context. |
void |
setContext(OID acsObjectOID,
OID contextOID)
Sets the permission context of the object specified by acsObjectOID to the object specified by contextOID. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int VIRTUAL_PUBLIC_ID
public static final int VIRTUAL_REGISTERED_ID
public static final int SYSTEM_PARTY
| Constructor Detail |
public PermissionManager()
| Method Detail |
public boolean checkPermission(PermissionDescriptor permission)
PermissionDescriptor.
permission - the PermissionDescriptor to
provide service to
true if the PermissionDescriptor's base object has the
specified permission; false otherwise.public void grantPermission(PermissionDescriptor permission)
permission - the PermissionDescriptor to retrieveACSObject,
PrivilegeDescriptorpublic void revokePermission(PermissionDescriptor permission)
PermissionDescriptor.
permission - the PermissionDescriptor that contains the
parameters of the permission to revokeACSObject,
PrivilegeDescriptorpublic DataObject getContext(OID oid)
oid - the OID of the ACS object
for which to retrieve the permission context
ACSObject,
OIDpublic DataObject getContext(ACSObject acsObject)
acsObject - the ACS object for which to retrieve
the permission context
ACSObject,
OID
public void setContext(ACSObject acsObject,
ACSObject context)
throws PersistenceException
acsObject - the object whose permission context is being
setcontext - the object to set as the permission context
PersistenceException - when the setting of the
permission context could not be saved.UniversalPermissionDescriptor
public void setContext(OID acsObjectOID,
OID contextOID)
throws PersistenceException
acsObjectOID - the object whose permission context is being
setcontextOID - the object to set as the permission context
PersistenceException - when the setting of the
permission context could not be saved.UniversalPermissionDescriptor
public void clonePermissions(ACSObject acsObject)
throws PersistenceException
acsObject - the object whose permission context is being
set
PersistenceException - when the setting of the
permission context could not be saved.
public void clonePermissions(OID acsObjectOID)
throws PersistenceException
acsObjectOID - the object whose permission context is being
set
PersistenceException - when the setting of the
permission context could not be saved.public ObjectPermissionCollection getGrantedPermissions(OID acsObjectOID)
acsObjectOID - the OID of the ACS object whose permissions
are to be returned
public ObjectPermissionCollection getGrantedUniversalPermissions()
public void filterObjects(DataCollection dataCollection,
PrivilegeDescriptor privilege,
OID partyOID)
dataCollection - the collection to filter. Must be
a collection of type ACSObject.privilege - the required privilegepartyOID - the OID of the party whose access is being filtered
public void filterQuery(DataQuery dataQuery,
String propertyName,
PrivilegeDescriptor privilege,
OID partyOID)
dataQuery - the query to filterpropertyName - the name of the query property that contains the
ID values to filter. (The values are assumed to be IDs of ACSObjects.)privilege - the required privilegepartyOID - the OID of the party whose access is being filtered
public Filter getFilterQuery(FilterFactory factory,
String propertyName,
PrivilegeDescriptor privilege,
OID partyOID)
factory - A FilterFactory to generate the filterpropertyName - the name of the query property that contains the
ID values to filter. (The values are assumed to be IDs of ACSObjects.)privilege - the required privilegepartyOID - the OID of the party whose access is being filtered
public Filter getObjectFilterQuery(FilterFactory factory,
String propertyName,
PrivilegeDescriptor privilege,
OID objectOID)
public Iterator getPrivileges(OID object,
OID party)
object - the OID of the target object of the privileges to be returnedparty - the OID of the party that privileges are to be returned for
public Iterator getImpliedPrivileges(OID object,
OID party)
object - the OID of the target object of the privileges to be returnedparty - the OID of the party that privileges are to be returned for
getPrivileges(OID, OID)public static Collection constructAccessList(OID partyOID)
partyOID - an OID value
Collection valuepublic OID checkOID(OID oid)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||