/** * Copies all of the applicable properties to the listener that have been set on this class. * * @param listener */ protected void prepareExportToWriterListener(ExportToWriterListener listener) { super.prepareExportListener(listener); if (includeXmlOutputListener) { listener.onGenerateOutput(new XmlOutputListener()); } if (recordPrefix != null) { listener.withRecordPrefix(recordPrefix); } if (recordSuffix != null) { listener.withRecordSuffix(recordSuffix); } }
public ExportToFileJob() { super(); addRequiredJobProperty("exportPath", "The path of the file to which selected records are exported", value -> setExportFile(new File(value))); addJobProperty("fileHeader", "Optional content that should be written to the start of each file", value -> setFileHeader(value)); addJobProperty("fileFooter", "Optional content that should be written to the end of each file", value -> setFileFooter(value)); addJobProperty("recordPrefix", "Optional content to be written before each record is written", value -> getExportListener().withRecordPrefix(value)); addJobProperty("recordSuffix", "Optional content to be written after each record is written", value -> getExportListener().withRecordSuffix(value)); addJobProperty("transform", "Optional REST transform to apply to each record before it is written", value -> getExportListener().withTransform(new ServerTransform(value))); }