/** * Sets a configuration property. * * @param key the property key. * @param value the property value. */ public void setConfigProperty(final String key, final String value) { if (wrappedConfiguration instanceof ModifiableConfiguration) { final ModifiableConfiguration modConfiguration = (ModifiableConfiguration) wrappedConfiguration; modConfiguration.setConfigProperty(key, value); } }
/** * Returns all defined configuration properties for the report. The enumeration contains all * keys of the changed properties, properties set from files or the system properties are not * included. * * @return all defined configuration properties for the report. */ public Enumeration<String> getConfigProperties() { if (wrappedConfiguration instanceof ModifiableConfiguration) { final ModifiableConfiguration modConfiguration = (ModifiableConfiguration) wrappedConfiguration; return modConfiguration.getConfigProperties(); } return super.getConfigProperties(); }
protected MasterReport tuneForTesting(final MasterReport report) throws Exception { final ModifiableConfiguration configuration = report.getReportConfiguration(); configuration.setConfigProperty( DefaultReportEnvironment.ENVIRONMENT_KEY + "::internal::report.date", "2011-04-07T15:00:00.000+0000"); configuration.setConfigProperty( DefaultReportEnvironment.ENVIRONMENT_TYPE + "::internal::report.date", "java.util.Date"); return report; }
/** * Returns a new (and not connected to the default config from the job) configuration containing * all properties from the dialog. * * @param full * @return */ protected Configuration grabDialogContents(final boolean full) { final ModifiableConfiguration config = new DefaultConfiguration(); config.setConfigProperty(CSVProcessor.CSV_SEPARATOR, getSeparatorString()); config.setConfigProperty( CSVProcessor.CSV_DATAROWNAME, String.valueOf(isColumnNamesAsFirstRow())); config.setConfigProperty(CSVProcessor.CSV_ENCODING, getEncoding()); config.setConfigProperty( CSVProcessor.CSV_ENABLE_GROUPFOOTERS, String.valueOf(isEnableGroupFooter())); config.setConfigProperty( CSVProcessor.CSV_ENABLE_GROUPHEADERS, String.valueOf(isEnableGroupHeader())); config.setConfigProperty( CSVProcessor.CSV_ENABLE_ITEMBANDS, String.valueOf(isEnableItembands())); config.setConfigProperty( CSVProcessor.CSV_ENABLE_REPORTFOOTER, String.valueOf(isEnableReportFooter())); config.setConfigProperty( CSVProcessor.CSV_ENABLE_REPORTHEADER, String.valueOf(isEnableReportHeader())); config.setConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.gui.csv.FileName", getFilename()); //$NON-NLS-1$ config.setConfigProperty(CSVProcessor.CSV_WRITE_STATECOLUMNS, "false"); // $NON-NLS-1$ return config; }