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.PostUpdateEventListener
responsible 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 theSecuritySystem
to see if the event is allowed, and if not, another call is made to theSecuritySystem
to 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 void
onPostDelete(org.hibernate.event.PostDeleteEvent event)
unusedvoid
onPostInsert(org.hibernate.event.PostInsertEvent event)
unusedvoid
onPostLoad(org.hibernate.event.PostLoadEvent event)
catches all load events after the fact, and tests the current users permissions to read that object.void
onPostUpdate(org.hibernate.event.PostUpdateEvent event)
unusedboolean
onPreDelete(org.hibernate.event.PreDeleteEvent event)
boolean
onPreInsert(org.hibernate.event.PreInsertEvent event)
void
onPreLoad(org.hibernate.event.PreLoadEvent event)
unusedboolean
onPreUpdate(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:
onPostDelete
in interfaceorg.hibernate.event.PostDeleteEventListener
-
onPostInsert
public void onPostInsert(org.hibernate.event.PostInsertEvent event)
unused- Specified by:
onPostInsert
in interfaceorg.hibernate.event.PostInsertEventListener
-
onPostUpdate
public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)
unused- Specified by:
onPostUpdate
in interfaceorg.hibernate.event.PostUpdateEventListener
-
onPreLoad
public void onPreLoad(org.hibernate.event.PreLoadEvent event)
unused- Specified by:
onPreLoad
in 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:
onPostLoad
in interfaceorg.hibernate.event.PostLoadEventListener
-
onPreInsert
public boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
- Specified by:
onPreInsert
in interfaceorg.hibernate.event.PreInsertEventListener
-
onPreUpdate
public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
- Specified by:
onPreUpdate
in interfaceorg.hibernate.event.PreUpdateEventListener
-
onPreDelete
public boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)
- Specified by:
onPreDelete
in interfaceorg.hibernate.event.PreDeleteEventListener
-
-