Class DataSourceCollector
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.datasource.DataSourceCollector
-
- All Implemented Interfaces:
Serializable
,ClassFactory
,DataSourceFactory
public class DataSourceCollector extends Object implements DataSourceFactory
ADataSourceFactory
created from a number of other factories.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataSourceCollector()
Creates a new factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFactory(DataSourceFactory factory)
Adds a factory to the collection.void
configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory.org.pentaho.reporting.libraries.base.config.Configuration
getConfig()
Returns the currently set configuration or null, if none was set.ObjectDescription
getDataSourceDescription(String name)
Returns a data source description.String
getDataSourceName(ObjectDescription od)
Returns a data source name.ObjectDescription
getDescriptionForClass(Class c)
Returns a description for the class.Iterator
getFactories()
Returns an iterator that provides access to the factories.Iterator
getRegisteredClasses()
Returns an iterator that provides access to the registered classes.Iterator
getRegisteredNames()
Returns the names of all registered datasources as iterator.ObjectDescription
getSuperClassObjectDescription(Class d, ObjectDescription knownSuperClass)
Returns a description for the super class.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ClassFactory
equals, hashCode
-
-
-
-
Method Detail
-
addFactory
public void addFactory(DataSourceFactory factory)
Adds a factory to the collection.- Parameters:
factory
- the factory.
-
getFactories
public Iterator getFactories()
Returns an iterator that provides access to the factories.- Returns:
- The iterator.
-
getDataSourceDescription
public ObjectDescription getDataSourceDescription(String name)
Returns a data source description.- Specified by:
getDataSourceDescription
in interfaceDataSourceFactory
- Parameters:
name
- the data source name.- Returns:
- The description.
-
getDataSourceName
public String getDataSourceName(ObjectDescription od)
Returns a data source name.- Specified by:
getDataSourceName
in interfaceDataSourceFactory
- Parameters:
od
- the object description.- Returns:
- The name.
-
getDescriptionForClass
public ObjectDescription getDescriptionForClass(Class c)
Returns a description for the class.- Specified by:
getDescriptionForClass
in interfaceClassFactory
- Parameters:
c
- the class.- Returns:
- The description.
-
getSuperClassObjectDescription
public ObjectDescription getSuperClassObjectDescription(Class d, ObjectDescription knownSuperClass)
Returns a description for the super class.- Specified by:
getSuperClassObjectDescription
in interfaceClassFactory
- Parameters:
d
- the class.knownSuperClass
- the last known super class for the given class or null if none was found yet.- Returns:
- The object description suitable to create instances of the given class d.
-
getRegisteredClasses
public Iterator getRegisteredClasses()
Returns an iterator that provides access to the registered classes.- Specified by:
getRegisteredClasses
in interfaceClassFactory
- Returns:
- The iterator.
-
configure
public void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory. The configuration contains several keys and their defined values. The given reference to the configuration object will remain valid until the report parsing or writing ends. The configuration contents may change during the reporting.- Specified by:
configure
in interfaceClassFactory
- Parameters:
config
- the configuration, never null
-
getConfig
public org.pentaho.reporting.libraries.base.config.Configuration getConfig()
Returns the currently set configuration or null, if none was set.- Returns:
- the configuration.
-
getRegisteredNames
public Iterator getRegisteredNames()
Returns the names of all registered datasources as iterator.- Specified by:
getRegisteredNames
in interfaceDataSourceFactory
- Returns:
- the registered names.
-
-