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.AbstractFactoryBean
configuring all the possibleevent listeners
within XML can be cumbersome.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
debugAll
-
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 void
additions()
protected void
append(java.lang.String key, java.lang.Object... objs)
appends the objects to the existing list identified by key.protected java.lang.Object
createInstance()
First, adds all default listeners.java.lang.Class
getObjectType()
thisFactoryBean
produces aMap
instance for use inLocalSessionFactoryBean.setEventListeners(Map)
boolean
isSingleton()
being a singleton implies that thisFactoryBean
will only ever create one instance.protected void
override(java.lang.String[] keys, java.lang.Object object)
calls override for each keyprotected void
override(java.lang.String key, java.lang.Object object)
first re-initializes the list for key, and then adds objectprotected void
overrides()
protected void
prepend(java.lang.String key, java.lang.Object... objs)
adds the objects to the existing list identified by key.protected void
put(java.lang.String key, java.lang.Object[] objs)
replaces the key with the provided objects or an empty list if none providedvoid
setDebugAll(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()
thisFactoryBean
produces aMap
instance for use inLocalSessionFactoryBean.setEventListeners(Map)
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean
-
isSingleton
public boolean isSingleton()
being a singleton implies that thisFactoryBean
will only ever create one instance.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean
- Overrides:
isSingleton
in classorg.springframework.beans.factory.config.AbstractFactoryBean
-
createInstance
protected java.lang.Object createInstance() throws java.lang.Exception
First, adds all default listeners. These are then overwritten.- Specified by:
createInstance
in 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
-
-