com.atlassian.jira.config.component
Class LicenseComponentAdaptor

java.lang.Object
  extended by com.atlassian.jira.config.component.AbstractComponentAdaptor
      extended by com.atlassian.jira.config.component.LicenseComponentAdaptor
All Implemented Interfaces:
org.picocontainer.ComponentAdapter

public class LicenseComponentAdaptor
extends AbstractComponentAdaptor

A component adaptor that returns a different instance of a class depending on the license that is running in JIRA.

The Standard version should already be registered in the container, whilst the Professional and/or Enterprise version will have its dependencies resolved automatically.

If no implementation is registered for Professional version (null is passed) the adapter will try to fall back onto the registered Standard implementation (if any). If no implementation is passed for the Standard version, this adapter will return a dynamic proxy that throws an UnsupportedOperationException for any calls to it.


Field Summary
 
Fields inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
container, interfaceClass
 
Constructor Summary
LicenseComponentAdaptor(Class interfaceClass, String enterpriseClassName, String professionalClassName, Class standardClass)
           
 
Method Summary
 Class getComponentImplementation()
           
 Object getComponentInstance()
           
 
Methods inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
getComponentKey, getContainer, setContainer, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseComponentAdaptor

public LicenseComponentAdaptor(Class interfaceClass,
                               String enterpriseClassName,
                               String professionalClassName,
                               Class standardClass)
Method Detail

getComponentImplementation

public Class getComponentImplementation()
Specified by:
getComponentImplementation in interface org.picocontainer.ComponentAdapter
Specified by:
getComponentImplementation in class AbstractComponentAdaptor

getComponentInstance

public Object getComponentInstance()
                            throws org.picocontainer.PicoInitializationException,
                                   org.picocontainer.PicoIntrospectionException
Specified by:
getComponentInstance in interface org.picocontainer.ComponentAdapter
Specified by:
getComponentInstance in class AbstractComponentAdaptor
Throws:
org.picocontainer.PicoInitializationException
org.picocontainer.PicoIntrospectionException


Copyright © 2002-2009 Atlassian. All Rights Reserved.