info.informatica.report.data
Class SimpleDataSource

java.lang.Object
  extended by info.informatica.report.data.SimpleDataSource
All Implemented Interfaces:
ReportDataSource
Direct Known Subclasses:
JDBCDataSource

public class SimpleDataSource
extends Object
implements ReportDataSource

A simple Map-based DataSource implementation.

Author:
Carlos Amengual (amengual at informatica.info)

Constructor Summary
SimpleDataSource()
           
 
Method Summary
 void close()
          Release all the resources associated to this data source
 Dataset getData(ReportDataSpec segment)
          Gives the appropriate dataset for the requested segment.
 Map<String,? extends Object> getEnviron()
          Gets the global environment of the data (for example author, generator, etc.)
 void putData(String segment_name, Dataset data)
           
 void setEnviron(Map<String,? extends Object> environ)
          Sets the global environment of the data (for example author, generator, etc.)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataSource

public SimpleDataSource()
Method Detail

getData

public Dataset getData(ReportDataSpec segment)
                throws DatasetException
Description copied from interface: ReportDataSource
Gives the appropriate dataset for the requested segment.

Specified by:
getData in interface ReportDataSource
Parameters:
segment - the datasource specification.
Returns:
the requested dataset, or null if there is no data for the spec.
Throws:
DatasetException - if an error occurred when preparing the data for the segment.

putData

public void putData(String segment_name,
                    Dataset data)

setEnviron

public void setEnviron(Map<String,? extends Object> environ)
Description copied from interface: ReportDataSource
Sets the global environment of the data (for example author, generator, etc.)

Specified by:
setEnviron in interface ReportDataSource
Parameters:
environ - A Map containing the spec_id-value environment variables.

getEnviron

public Map<String,? extends Object> getEnviron()
Description copied from interface: ReportDataSource
Gets the global environment of the data (for example author, generator, etc.)

Specified by:
getEnviron in interface ReportDataSource
Returns:
the Map containing the spec_id-value environment variables.

close

public void close()
Description copied from interface: ReportDataSource
Release all the resources associated to this data source

Specified by:
close in interface ReportDataSource