Package ome.security

Class 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 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
    See Also:
    SecuritySystem, SecurityViolation, Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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