Package ome.security
Class ACLEventListener
- java.lang.Object
-
- ome.security.ACLEventListener
-
- All Implemented Interfaces:
java.io.Serializable,org.hibernate.event.PostDeleteEventListener,org.hibernate.event.PostInsertEventListener,org.hibernate.event.PostLoadEventListener,org.hibernate.event.PostUpdateEventListener,org.hibernate.event.PreDeleteEventListener,org.hibernate.event.PreInsertEventListener,org.hibernate.event.PreLoadEventListener,org.hibernate.event.PreUpdateEventListener
public class ACLEventListener extends java.lang.Object implements org.hibernate.event.PreDeleteEventListener, org.hibernate.event.PreInsertEventListener, org.hibernate.event.PreLoadEventListener, org.hibernate.event.PreUpdateEventListener, org.hibernate.event.PostDeleteEventListener, org.hibernate.event.PostInsertEventListener, org.hibernate.event.PostLoadEventListener, org.hibernate.event.PostUpdateEventListenerresponsible for intercepting all pre-INSERT, pre-UPDATE, pre-DELETE, and post-LOAD events to apply access control. For each event, a call is made to theSecuritySystemto see if the event is allowed, and if not, another call is made to theSecuritySystemto throw aSecurityViolation.- Since:
- 3.0-M3
- See Also:
SecuritySystem,SecurityViolation, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ACLEventListener(ACLVoter aclVoter)main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonPostDelete(org.hibernate.event.PostDeleteEvent event)unusedvoidonPostInsert(org.hibernate.event.PostInsertEvent event)unusedvoidonPostLoad(org.hibernate.event.PostLoadEvent event)catches all load events after the fact, and tests the current users permissions to read that object.voidonPostUpdate(org.hibernate.event.PostUpdateEvent event)unusedbooleanonPreDelete(org.hibernate.event.PreDeleteEvent event)booleanonPreInsert(org.hibernate.event.PreInsertEvent event)voidonPreLoad(org.hibernate.event.PreLoadEvent event)unusedbooleanonPreUpdate(org.hibernate.event.PreUpdateEvent event)
-
-
-
Constructor Detail
-
ACLEventListener
public ACLEventListener(ACLVoter aclVoter)
main constructor. controls access to individual db rows..
-
-
Method Detail
-
onPostDelete
public void onPostDelete(org.hibernate.event.PostDeleteEvent event)
unused- Specified by:
onPostDeletein interfaceorg.hibernate.event.PostDeleteEventListener
-
onPostInsert
public void onPostInsert(org.hibernate.event.PostInsertEvent event)
unused- Specified by:
onPostInsertin interfaceorg.hibernate.event.PostInsertEventListener
-
onPostUpdate
public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)
unused- Specified by:
onPostUpdatein interfaceorg.hibernate.event.PostUpdateEventListener
-
onPreLoad
public void onPreLoad(org.hibernate.event.PreLoadEvent event)
unused- Specified by:
onPreLoadin interfaceorg.hibernate.event.PreLoadEventListener
-
onPostLoad
public void onPostLoad(org.hibernate.event.PostLoadEvent event)
catches all load events after the fact, and tests the current users permissions to read that object. We have to catch the load after the fact because the permissions information is stored in the db.- Specified by:
onPostLoadin interfaceorg.hibernate.event.PostLoadEventListener
-
onPreInsert
public boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
- Specified by:
onPreInsertin interfaceorg.hibernate.event.PreInsertEventListener
-
onPreUpdate
public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
- Specified by:
onPreUpdatein interfaceorg.hibernate.event.PreUpdateEventListener
-
onPreDelete
public boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)
- Specified by:
onPreDeletein interfaceorg.hibernate.event.PreDeleteEventListener
-
-