com.atlassian.plugin.osgi.module
Class BeanPrefixModuleFactory

java.lang.Object
  extended by com.atlassian.plugin.osgi.module.BeanPrefixModuleFactory
All Implemented Interfaces:
ModuleFactory, PrefixModuleFactory

public class BeanPrefixModuleFactory
extends Object
implements PrefixModuleFactory

The BeanModuleFactory creates a java bean for the given module class by resolving the name to bean reference. It returns a reference to this bean.

Since:
2.5.0

Field Summary
 
Fields inherited from interface com.atlassian.plugin.module.ModuleFactory
LEGACY_MODULE_FACTORY
 
Constructor Summary
BeanPrefixModuleFactory()
           
 
Method Summary
<T> T
createModule(String name, ModuleDescriptor<T> moduleDescriptor)
          Creates the module instance.
 String getPrefix()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanPrefixModuleFactory

public BeanPrefixModuleFactory()
Method Detail

createModule

public <T> T createModule(String name,
                          ModuleDescriptor<T> moduleDescriptor)
Description copied from interface: 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.

Specified by:
createModule in interface ModuleFactory
Parameters:
name - 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
Returns:
an instantiated object of the module class.

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface PrefixModuleFactory
Returns:
the prefix the module factory expects to be matched to


Copyright © 2015 Atlassian. All rights reserved.