use of net.sourceforge.processdash.ev.ui.TaskScheduleChartSettings.PersistenceException in project processdash by dtuma.
the class TaskScheduleChartUtil method getParameters.
/**
* Get the parameters that should be passed to an EV Chart snippet widget.
*
* @throws PersistenceException
* if the parameters for this settings object cannot be
* read/parsed
*/
public static Map getParameters(TaskScheduleChartSettings settings) throws PersistenceException {
Map result = new HashMap();
if (settings != null) {
try {
result.putAll(settings.getParameters());
result.put(EVSnippetEnvironment.SNIPPET_VERSION, settings.getChartVersion());
result.put(EVSnippetEnvironment.EV_CUSTOM_SNIPPET_NAME_KEY, settings.getCustomName());
} catch (PersistenceException pe) {
// the exception.
if (settings.getCustomName() != null)
throw pe;
// otherwise, if this is a standard chart and the
// saved settings can't be read, revert back to the
// default settings provided by that chart.
logger.log(Level.SEVERE, "Unexpected problem reading " + "settings for chart with id '" + settings.getChartID() + "' - reverting to defaults", pe);
result = new HashMap();
}
}
return result;
}
Aggregations