public class EventHandler extends java.lang.Object implements org.aopalliance.intercept.MethodInterceptor, org.springframework.context.ApplicationListener<ContextMessage>
BasicSecuritySystem provided in the
constructor.
After the method is invoked various cleanup actions are performed and finally all credentials
all cleared from the
Thread.| Modifier and Type | Field and Description |
|---|---|
protected SessionFactory |
factory |
protected boolean |
readOnly |
protected BasicSecuritySystem |
secSys |
protected ome.util.SqlAction |
sql |
protected org.springframework.transaction.interceptor.TransactionAttributeSource |
txSource |
| Constructor and Description |
|---|
EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
Deprecated.
|
EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource,
ReadOnlyStatus readOnly) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doLogin(boolean readOnly,
boolean isClose) |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation arg0)
Invocation interceptor for preparing this
Thread for execution
and subsequently resetting it. |
void |
onApplicationEvent(ContextMessage msg)
If a
ContextMessage is received then we need to either add a
ContextMessage.Push login to the stack or
ContextMessage.Pop remove one. |
protected final org.springframework.transaction.interceptor.TransactionAttributeSource txSource
protected final BasicSecuritySystem secSys
protected final SessionFactory factory
protected final ome.util.SqlAction sql
protected final boolean readOnly
@Deprecated
public EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource)
HibernateTemplate and BasicSecuritySystem.sql - the SQL actionsecuritySystem - the security systemfactory - the Hibernate session factorytxSource - the Spring transaction attribute sourcepublic EventHandler(ome.util.SqlAction sql,
BasicSecuritySystem securitySystem,
SessionFactory factory,
org.springframework.transaction.interceptor.TransactionAttributeSource txSource,
ReadOnlyStatus readOnly)
public void onApplicationEvent(ContextMessage msg)
ContextMessage is received then we need to either add a
ContextMessage.Push login to the stack or
ContextMessage.Pop remove one.onApplicationEvent in interface org.springframework.context.ApplicationListener<ContextMessage>public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation arg0)
throws java.lang.Throwable
Thread for execution
and subsequently resetting it.invoke in interface org.aopalliance.intercept.MethodInterceptorjava.lang.ThrowableMethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)public boolean doLogin(boolean readOnly,
boolean isClose)