Class AutodetectModuleFactoryHolder
- java.lang.Object
-
- com.atlassian.confluence.plugin.AutodetectModuleFactoryHolder
-
@Deprecated public class AutodetectModuleFactoryHolder extends Object
Deprecated.since 7.0.1. All these constructions are dirty hacks which exist because we can't convert everything at once to constructor injection. In version 8.0.0 we will have to convert all the things to constructor injection and after that we can get rid of all these constructs and just use pure Plugins Framework instruments for injection.This class just holds the instance ofModuleFactory
. The reason why we need it is to make possible to have more than one ModuleFactory.In Plugins Framework 5 we had a problem that default injection becomes by constructor. This doesn't always work because connie has macros which are using setter injection. To make it still work we have to replace some parts of Plugins Framework to our custom parts which continue to use autowiring. For example see
AutodetectClassPrefixModuleFactory
.After creating these custom parts we a faced with a problem of how to inject them to necessary places. We can't create 2 instances of ModuleFactory, because Spring will blow up on type injection (it will not know what to inject). To make Spring happy we need to have some other custom type which can be registered into Spring and injected. This class is created just to be this custom type which sits in Spring context and is available for injection. See the constructor of
XhtmlMacroModuleDescriptor
for example of how we inject the instance of this class.- Since:
- 7.0.1
-
-
Constructor Summary
Constructors Constructor Description AutodetectModuleFactoryHolder(com.atlassian.plugin.module.ModuleFactory origin)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.atlassian.plugin.module.ModuleFactory
get()
Deprecated.
-