|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.transactSecurity.UserProfilePolicy
Use this class to create Object level access restrictions and to process ObjectAccessed events. You would use this class to enforce Security policys. It shouldn't be used to do general security issues. Generally works like this. >>objectAccessed() Get current ExternalActorProfile. Get ObjectAccessRights Determine access allowed, throw exception if not! This class is really a raw implementation. Use appendClassProfile(Class, readProfiles, writeProfiles) to create the access lists. Examples This would force mandatory granting of write access for every object that is to be written to. userProfilePolicy.appendClassProfile(Object.class, -1, 0); Read access is granted to all profiles. Only those of profile type 2 have write access to implementors of AccessSecurityIF userProfilePolicy.appendClassProfile(AccessSecurityIF.class, -1, 2);
Constructor Summary | |
UserProfilePolicy()
|
Method Summary | |
void |
appendClassProfile(java.lang.Class c,
long read,
long write)
Do a bitwise or with any existing class profiles for this class. |
static void |
main(java.lang.String[] args)
Test method. |
void |
objectAccessed(ObjectAccessEvent event)
Called when someone is trying to access an object. |
void |
removeProfile(java.lang.Class c)
Remove any access restrictions for class C. |
void |
setCurrentActorProfiles(long l)
Used to establish the rights for the current ExternalActor Each bit represents a profile of the current ExternalActor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserProfilePolicy()
Method Detail |
public static void main(java.lang.String[] args)
args
- The command line argumentspublic void setCurrentActorProfiles(long l)
l
- The new CurrentActorProfiles valuepublic void appendClassProfile(java.lang.Class c, long read, long write)
read
- - All profiles that have read access to Class c should be
marked in this parameter.write
- - All profiles that have write access to Class c should be
marked in this parameter.c
- - The class for which access rights are being established.public void objectAccessed(ObjectAccessEvent event)
objectAccessed
in interface ObjectAccessListener
event
- public void removeProfile(java.lang.Class c)
c
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |