Package ome.security.basic
Class EventListenersFactoryBean
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean
-
- ome.security.basic.EventListenersFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean,org.springframework.beans.factory.InitializingBean
public class EventListenersFactoryBean extends org.springframework.beans.factory.config.AbstractFactoryBeanconfiguring all the possibleevent listenerswithin XML can be cumbersome.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandebugAll
-
Constructor Summary
Constructors Constructor Description EventListenersFactoryBean(CurrentDetails cd, TokenHolder th, ACLVoter voter, OmeroInterceptor interceptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadditions()protected voidappend(java.lang.String key, java.lang.Object... objs)appends the objects to the existing list identified by key.protected java.lang.ObjectcreateInstance()First, adds all default listeners.java.lang.ClassgetObjectType()thisFactoryBeanproduces aMapinstance for use inLocalSessionFactoryBean.setEventListeners(Map)booleanisSingleton()being a singleton implies that thisFactoryBeanwill only ever create one instance.protected voidoverride(java.lang.String[] keys, java.lang.Object object)calls override for each keyprotected voidoverride(java.lang.String key, java.lang.Object object)first re-initializes the list for key, and then adds objectprotected voidoverrides()protected voidprepend(java.lang.String key, java.lang.Object... objs)adds the objects to the existing list identified by key.protected voidput(java.lang.String key, java.lang.Object[] objs)replaces the key with the provided objects or an empty list if none providedvoidsetDebugAll(boolean debug)for setter injection
-
-
-
Constructor Detail
-
EventListenersFactoryBean
public EventListenersFactoryBean(CurrentDetails cd, TokenHolder th, ACLVoter voter, OmeroInterceptor interceptor)
-
-
Method Detail
-
getObjectType
public java.lang.Class getObjectType()
thisFactoryBeanproduces aMapinstance for use inLocalSessionFactoryBean.setEventListeners(Map)- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean
-
isSingleton
public boolean isSingleton()
being a singleton implies that thisFactoryBeanwill only ever create one instance.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean- Overrides:
isSingletonin classorg.springframework.beans.factory.config.AbstractFactoryBean
-
createInstance
protected java.lang.Object createInstance() throws java.lang.ExceptionFirst, adds all default listeners. These are then overwritten.- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean- Throws:
java.lang.Exception
-
setDebugAll
public void setDebugAll(boolean debug)
for setter injection
-
overrides
protected void overrides()
-
additions
protected void additions()
-
override
protected void override(java.lang.String[] keys, java.lang.Object object)calls override for each key
-
override
protected void override(java.lang.String key, java.lang.Object object)first re-initializes the list for key, and then adds object
-
append
protected void append(java.lang.String key, java.lang.Object... objs)appends the objects to the existing list identified by key. If no list is found, initializes. If there are no objects, just initializes if necessary.
-
prepend
protected void prepend(java.lang.String key, java.lang.Object... objs)adds the objects to the existing list identified by key. If no list is found, initializes. If there are no objects, just initializes if necessary.
-
put
protected void put(java.lang.String key, java.lang.Object[] objs)replaces the key with the provided objects or an empty list if none provided
-
-