com.atlassian.confluence.user.crowd
Class ConfluenceSpringContextInstanceFactory
java.lang.Object
com.atlassian.confluence.user.crowd.ConfluenceSpringContextInstanceFactory
- All Implemented Interfaces:
- com.atlassian.crowd.util.InstanceFactory, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
public class ConfluenceSpringContextInstanceFactory
- extends Object
- implements com.atlassian.crowd.util.InstanceFactory, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Overrides the getInstance(Class)
method such that certain beans are created from a prototyped scope. This allows
us to override the definition of what beans are used in the constructor. This fixes a problem where spring is unable to
determine which class to use for the interface LDAPQueryTranslater
because there
are two definitions of this bean.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfluenceSpringContextInstanceFactory
public ConfluenceSpringContextInstanceFactory(Map<Class<?>,String> beanMapping)
getInstance
public Object getInstance(String className)
throws ClassNotFoundException
- Specified by:
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
- Throws:
ClassNotFoundException
getInstance
public Object getInstance(String className,
ClassLoader classLoader)
throws ClassNotFoundException
- Specified by:
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
- Throws:
ClassNotFoundException
getInstance
public <T> T getInstance(Class<T> clazz)
- Specified by:
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
Copyright © 2003–2015 Atlassian. All rights reserved.