ome.security
Class ACLEventListener

java.lang.Object
  extended by ome.security.ACLEventListener
All Implemented Interfaces:
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 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 the SecuritySystem to see if the event is allowed, and if not, another call is made to the SecuritySystem to throw a SecurityViolation.

Since:
3.0-M3
Version:
$Revision: 6440 $, $Date: 2010-03-31 11:44:33 +0100 (Wed, 31 Mar 2010) $
Author:
Josh Moore, josh.moore at gmx.de
See Also:
SecuritySystem, SecurityViolation, Serialized Form

Constructor Summary
ACLEventListener(ACLVoter aclVoter)
          main constructor. controls access to individual db rows..
 
Method Summary
 void onPostDelete(org.hibernate.event.PostDeleteEvent event)
          unused
 void onPostInsert(org.hibernate.event.PostInsertEvent event)
          unused
 void 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)
          unused
 boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)
           
 boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
           
 void onPreLoad(org.hibernate.event.PreLoadEvent event)
          unused
 boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface org.hibernate.event.PostDeleteEventListener

onPostInsert

public void onPostInsert(org.hibernate.event.PostInsertEvent event)
unused

Specified by:
onPostInsert in interface org.hibernate.event.PostInsertEventListener

onPostUpdate

public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)
unused

Specified by:
onPostUpdate in interface org.hibernate.event.PostUpdateEventListener

onPreLoad

public void onPreLoad(org.hibernate.event.PreLoadEvent event)
unused

Specified by:
onPreLoad in interface org.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 interface org.hibernate.event.PostLoadEventListener

onPreInsert

public boolean onPreInsert(org.hibernate.event.PreInsertEvent event)
Specified by:
onPreInsert in interface org.hibernate.event.PreInsertEventListener

onPreUpdate

public boolean onPreUpdate(org.hibernate.event.PreUpdateEvent event)
Specified by:
onPreUpdate in interface org.hibernate.event.PreUpdateEventListener

onPreDelete

public boolean onPreDelete(org.hibernate.event.PreDeleteEvent event)
Specified by:
onPreDelete in interface org.hibernate.event.PreDeleteEventListener


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.