java.lang.Object | |
↳ | com.atlassian.plugin.module.PrefixDelegatingModuleFactory |
The default implementation of a ModuleFactory
.
The module class name can contain a prefix and this prefix determines which ModuleFactory
is used to create the java class for this module descriptor.
ClassPrefixModuleFactory
to create the module class object.
ModuleFactories are located via the following algorithm. First, the prefixes registered during construction are searched, then
any implementations in the plugin's container, if applicable.
Implementation note: The plugin's container is searched, instead of
a general search for all OSGi services registered against PrefixModuleFactory
, because the factories
have to be available before any modules are created, and Spring DM, for example, ensures all required service
references are available before creating the context, which is then interpreted as an enabled plugin.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.plugin.module.ModuleFactory
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the module instance.
| |||||||||||
This method is deprecated.
Since 2.5.0
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the module factory for a prefix, first using registered prefixes, then any from the plugin's container.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.module.ModuleFactory
|
Creates the module instance. The module class name can contain a prefix. The delimiter of the prefix and the class name is ':'. E.g.: 'bean:httpServletBean'. Which prefixes are supported depends on the registered com.atlassian.plugin.module.ModuleCreator. The prefix is case in-sensitive.
className | module class name, can contain a prefix followed by ":" and the class name. Cannot be null If no prefix provided a default behaviour is assumed how to create the module class. |
---|---|
moduleDescriptor | the ModuleDescriptor . Cannot be null |
PluginParseException |
---|
This method is deprecated.
Since 2.5.0
This is not to be used. It is only for backwards compatibility with old code that uses
getEnabledModulesByClass(Class)
. This method can and will be
removed without warning.
name | The class name |
---|---|
moduleDescriptor | The module descriptor |
ModuleClassNotFoundException | |
ModuleClassNotFoundException |
Returns the module factory for a prefix, first using registered prefixes, then any from the plugin's container.
moduleReference | The module reference |
---|---|
moduleDescriptor | The descriptor containing the module |