badParameters = true;
throw new Exception(
"You may only use String, Date, javax.sql.Datasource, Long, Float, Double, BigDecimal, Integer, Boolean, or java.lang.Object as Parameter Types");
}
requiresInput = true;
ReportParameter rp = new ReportParameter();
rp.setName(jrPar.getName());
rp.setDescription(jrPar.getDescription());
rp.setClassType(jrPar.getValueClassName());
try {
Object o = new com.dotcms.repackage.bsh.Interpreter().eval(jrPar
.getDefaultValueExpression().getText());
if (o instanceof Date) {
o = ((Date) o).getTime();
}
rp.setDefaultValue(jrPar.getDefaultValueExpression()
.getText());
} catch (Exception e) {
Logger.debug(this, "No default Value for parameter"
+ e.toString());
}
rp.setReportInode(report.getInode());
ReportParameterFactory.saveReportParameter(rp);
}
}
}