de.laures.cewolf.dp
Class DataSourceXYDatasetProducer

java.lang.Object
  extended by de.laures.cewolf.dp.DataSourceXYDatasetProducer
All Implemented Interfaces:
DatasetProducer, java.io.Serializable

public class DataSourceXYDatasetProducer
extends java.lang.Object
implements DatasetProducer, java.io.Serializable

Author:
glaures
See Also:
Serialized Form

Field Summary
static java.lang.String PARAM_SERIES_LIST
           
 
Fields inherited from interface de.laures.cewolf.DatasetProducer
PRODUCER_ATTRIBUTE_NAME
 
Constructor Summary
DataSourceXYDatasetProducer()
           
 
Method Summary
 java.lang.String getProducerId()
          Tis method returns a unique ID for a DatasetProducer from this class.
 boolean hasExpired(java.util.Map params, java.util.Date since)
          This method is called by the Cewolf framework to check if a formerly produced data can be reused.
 java.lang.Object produceDataset(java.util.Map params)
          Produces a Dataset object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_SERIES_LIST

public static final java.lang.String PARAM_SERIES_LIST
See Also:
Constant Field Values
Constructor Detail

DataSourceXYDatasetProducer

public DataSourceXYDatasetProducer()
Method Detail

produceDataset

public java.lang.Object produceDataset(java.util.Map params)
                                throws DatasetProduceException
Description copied from interface: DatasetProducer
Produces a Dataset object.

Specified by:
produceDataset in interface DatasetProducer
Parameters:
params - additional params for the dataset production. All elements of this HashMap are of type java.io.Serializable. This is necessary to ensure the the serialization of the dataset producer into the http session. To provide a producer with additional production parameters the <param> tag is used (see tag library documentation). It is recommended to synchronize implementations of this method to avoid concurrency problems.
Returns:
an object of type org.jfree.data.general.Dataset.
Throws:
DatasetProduceException - if an error occured during production
See Also:
DatasetProducer.produceDataset(Map)

hasExpired

public boolean hasExpired(java.util.Map params,
                          java.util.Date since)
Description copied from interface: DatasetProducer
This method is called by the Cewolf framework to check if a formerly produced data can be reused. If the data which had already been used for chart rendering is still valid this method should return true. If possible the Cewolf framework will try to reuse the rendered chart image. If this is not possible because of some circumstances (e.g. the chart had been removed from the image cache) the produceDataset method is called afterwards. Therefore there is no guarantee that the dataset production is always avoided if this method returns true.

Specified by:
hasExpired in interface DatasetProducer
Parameters:
params - the production parameters of the already produced data
since - the point in time when the already produced data had been produced
Returns:
true if the data which had been produced with the passed in parameters has expired since its creation, false otherwise
See Also:
DatasetProducer.hasExpired(Map, Date)

getProducerId

public java.lang.String getProducerId()
Description copied from interface: DatasetProducer
Tis method returns a unique ID for a DatasetProducer from this class. Producers with the same ID are supposed to produce the same data when called with the same parameters.

Specified by:
getProducerId in interface DatasetProducer
Returns:
the unique ID for instances of this poducer class
See Also:
DatasetProducer.getProducerId()


cewolf tag library - web charts with JFreeChart