Class AutodetectClassPrefixModuleFactory

java.lang.Object
com.atlassian.plugin.module.ClassPrefixModuleFactory
com.atlassian.confluence.plugin.AutodetectClassPrefixModuleFactory
All Implemented Interfaces:
com.atlassian.plugin.module.ModuleFactory, com.atlassian.plugin.module.PrefixModuleFactory

@Deprecated public class AutodetectClassPrefixModuleFactory extends com.atlassian.plugin.module.ClassPrefixModuleFactory
Deprecated.
since 7.0.1. Should be removed in 8.0 when we finally start using constructor injection for everything.
The implementation of PrefixModuleFactory which uses autowiring instead of constructor wiring.

This class is created in response to Plugins Framework 5.X which started to use constructor injection as a default. This implementation imitates the old autowiring behaviour and lets our code to work with setter injection.

We are extending ClassPrefixModuleFactory here instead of implementing PrefixModuleFactory because there are hacks in Plugins Framework which use instanceof and will only work if we pretend to be a ClassPrefixModuleFactory.

Since:
7.0.1
  • Field Summary

    Fields inherited from class com.atlassian.plugin.module.ClassPrefixModuleFactory

    hostContainer

    Fields inherited from interface com.atlassian.plugin.module.ModuleFactory

    LEGACY_MODULE_FACTORY
  • Constructor Summary

    Constructors
    Constructor
    Description
    AutodetectClassPrefixModuleFactory(com.atlassian.plugin.hostcontainer.HostContainer hostContainer)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    createModule(String name, com.atlassian.plugin.ModuleDescriptor<T> moduleDescriptor)
    Deprecated.
     
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AutodetectClassPrefixModuleFactory

      public AutodetectClassPrefixModuleFactory(com.atlassian.plugin.hostcontainer.HostContainer hostContainer)
      Deprecated.
  • Method Details

    • createModule

      public <T> T createModule(String name, com.atlassian.plugin.ModuleDescriptor<T> moduleDescriptor) throws com.atlassian.plugin.PluginParseException
      Deprecated.
      Specified by:
      createModule in interface com.atlassian.plugin.module.ModuleFactory
      Overrides:
      createModule in class com.atlassian.plugin.module.ClassPrefixModuleFactory
      Throws:
      com.atlassian.plugin.PluginParseException
    • getPrefix

      public String getPrefix()
      Deprecated.
      Specified by:
      getPrefix in interface com.atlassian.plugin.module.PrefixModuleFactory
      Overrides:
      getPrefix in class com.atlassian.plugin.module.ClassPrefixModuleFactory