Package gda.spring
Class SpringApplicationContextBasedObjectFactory
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FactoryBase
gda.spring.SpringApplicationContextBasedObjectFactory
- All Implemented Interfaces:
Configurable,Factory
-
Field Summary
Fields inherited from class gda.factory.FactoryBase
GDA_FACTORY_ALLOW_EXCEPTION_IN_CONFIGURE -
Constructor Summary
ConstructorsConstructorDescriptionSpringApplicationContextBasedObjectFactory(org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFindable(Findable findable) Used to add theFindables to this factory<T extends Findable>
TgetFindable(String name) Return a named object from the factory or null if this factory can't provide the object.Returns a list of the names of all findable objects held in this factory.Returns the findable objects held in this factory.getFindablesOfType(Class<T> clazz) Return all objects of the requested type from this factory.booleanisLocal()Indicates whether this factory contains objects that have been instantiated locally.Methods inherited from class gda.factory.FactoryBase
configure, isAllowExceptionInConfigure, setAllowExceptionInConfigureMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigure
-
Constructor Details
-
SpringApplicationContextBasedObjectFactory
public SpringApplicationContextBasedObjectFactory(org.springframework.context.ApplicationContext applicationContext)
-
-
Method Details
-
addFindable
Description copied from interface:FactoryUsed to add theFindables to this factory- Parameters:
findable- the object to add.
-
getFindables
Description copied from interface:FactoryReturns the findable objects held in this factory.- Returns:
- the list of objects.
-
getFindableNames
Description copied from interface:FactoryReturns a list of the names of all findable objects held in this factory.- Returns:
- a list of findable names
-
getFindable
Description copied from interface:FactoryReturn a named object from the factory or null if this factory can't provide the object.- Type Parameters:
T- The type of the object to find- Parameters:
name- the name of the object as defined by theFindableinterface.- Returns:
- the named object or
nullif this factory can't provide it. - Throws:
FactoryException
-
getFindablesOfType
Description copied from interface:FactoryReturn all objects of the requested type from this factory.- Type Parameters:
T- The type of the object to find- Parameters:
clazz- the type of the objects to be found- Returns:
- a map of name to requested objects that can be provided from this factory or an empty map if none can be provided
-
isLocal
public boolean isLocal()Description copied from interface:FactoryIndicates whether this factory contains objects that have been instantiated locally.- Returns:
- whether this factory contains local objects
-