ome.security.basic
Class EventHandler

java.lang.Object
  extended by ome.security.basic.EventHandler
All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor

public class EventHandler
extends Object
implements MethodInterceptor

method interceptor responsible for login and creation of Events. Calls are made to the BasicSecuritySystem provided in the constructor. After the method is invoked various cleanup actions are performed and finally all credentials all cleared from the Thread.

Since:
3.0
Author:
Josh Moore      josh.moore@gmx.de

Field Summary
protected  SessionFactory factory
           
protected  boolean readOnly
           
protected  BasicSecuritySystem secSys
           
protected  ome.util.SqlAction sql
           
protected  org.springframework.transaction.interceptor.TransactionAttributeSource txSource
           
 
Constructor Summary
EventHandler(ome.util.SqlAction sql, BasicSecuritySystem securitySystem, SessionFactory factory, org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
          only public constructor, used for dependency injection.
EventHandler(ome.util.SqlAction sql, BasicSecuritySystem securitySystem, SessionFactory factory, org.springframework.transaction.interceptor.TransactionAttributeSource txSource, boolean readOnly)
           
 
Method Summary
 Object invoke(MethodInvocation arg0)
          invocation interceptor for prepairing this Thread for execution and subsequently reseting it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txSource

protected final org.springframework.transaction.interceptor.TransactionAttributeSource txSource

secSys

protected final BasicSecuritySystem secSys

factory

protected final SessionFactory factory

sql

protected final ome.util.SqlAction sql

readOnly

protected final boolean readOnly
Constructor Detail

EventHandler

public EventHandler(ome.util.SqlAction sql,
                    BasicSecuritySystem securitySystem,
                    SessionFactory factory,
                    org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
only public constructor, used for dependency injection. Requires an active HibernateTemplate and BasicSecuritySystem.

Parameters:
securitySystem - Not null.
template - Not null.

EventHandler

public EventHandler(ome.util.SqlAction sql,
                    BasicSecuritySystem securitySystem,
                    SessionFactory factory,
                    org.springframework.transaction.interceptor.TransactionAttributeSource txSource,
                    boolean readOnly)
Method Detail

invoke

public Object invoke(MethodInvocation arg0)
              throws Throwable
invocation interceptor for prepairing this Thread for execution and subsequently reseting it.

Specified by:
invoke in interface MethodInterceptor
Throws:
Throwable
See Also:
MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

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