public class ConfluenceSpringContextInstanceFactory extends Object implements com.atlassian.crowd.util.InstanceFactory, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
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.Constructor and Description |
---|
ConfluenceSpringContextInstanceFactory(Map<Class<?>,String> beanMapping) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
<T> T |
getInstance(Class<T> clazz) |
Object |
getInstance(String className) |
Object |
getInstance(String className,
ClassLoader classLoader) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public Object getInstance(String className) throws ClassNotFoundException
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
ClassNotFoundException
public Object getInstance(String className, ClassLoader classLoader) throws ClassNotFoundException
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
ClassNotFoundException
public <T> T getInstance(Class<T> clazz)
getInstance
in interface com.atlassian.crowd.util.InstanceFactory
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2003–2021 Atlassian. All rights reserved.