net.sf.taverna.t2.util.beanable
Class BeanableFactoryRegistry

java.lang.Object
  extended by net.sf.taverna.t2.spi.SPIRegistry<BeanableFactory>
      extended by net.sf.taverna.t2.util.beanable.BeanableFactoryRegistry
All Implemented Interfaces:
Observable<SPIRegistry.SPIRegistryEvent>

public class BeanableFactoryRegistry
extends SPIRegistry<BeanableFactory>

Registers all the individual BeanableFactorys discovered using an SPI lookup

Author:
Ian Dunlop, Stian Soiland

Nested Class Summary
 class BeanableFactoryRegistry.CheckOnUpdateObserver
           
 
Nested classes/interfaces inherited from class net.sf.taverna.t2.spi.SPIRegistry
SPIRegistry.RegistryListenerAdapter, SPIRegistry.SPIRegistryEvent
 
Field Summary
 
Fields inherited from class net.sf.taverna.t2.spi.SPIRegistry
UPDATED
 
Method Summary
 void checkFactories()
          Find all the BeanableFactorys and log any problems
 BeanableFactory getFactoryForBeanableType(java.lang.String beanableClassName)
          Given a Beanable class name find the factory which can create the appropriate bean
 BeanableFactory getFactoryForBeanType(java.lang.Class beanType)
          Given the class of bean find the factory which can create it
static BeanableFactoryRegistry getInstance()
          Singleton instance of the BeanableFactoryRegistry
 
Methods inherited from class net.sf.taverna.t2.spi.SPIRegistry
addObserver, getInstances, getObservers, getSpi, refresh, removeObserver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BeanableFactoryRegistry getInstance()
Singleton instance of the BeanableFactoryRegistry

Returns:
A singleton instance of the factory

checkFactories

public void checkFactories()
Find all the BeanableFactorys and log any problems


getFactoryForBeanableType

public BeanableFactory getFactoryForBeanableType(java.lang.String beanableClassName)
Given a Beanable class name find the factory which can create the appropriate bean

Parameters:
beanableClassName - the name of the Beanable
Returns:
he appropraite factory for creating the bean

getFactoryForBeanType

public BeanableFactory getFactoryForBeanType(java.lang.Class beanType)
Given the class of bean find the factory which can create it

Parameters:
beanType - the class of bean eg. net.sf.taverna.t2.cloudone.bean.DataDocumentBean
Returns:
the appropriate factory