}
public Node getJobNode(Node arg0, boolean savePasswords) throws SaveJobException {
try {
if (arg0 != null) {
Element filelist = ((Element) arg0).addElement("filelist");
PdfSelectionTableItem[] items = selectionPanel.getTableRows();
for (int i = 0; i < items.length; i++) {
Element fileNode = ((Element) filelist).addElement("file");
fileNode.addAttribute("name", items[i].getInputFile().getAbsolutePath());
fileNode.addAttribute("pageselection", (items[i].getPageSelection() != null) ? items[i]
.getPageSelection() : ALL_STRING);
if (savePasswords) {
fileNode.addAttribute("password", items[i].getPassword());
}
}
Element fileDestination = ((Element) arg0).addElement("destination");
fileDestination.addAttribute("value", destinationTextField.getText());
Element fileOverwrite = ((Element) arg0).addElement("overwrite");
fileOverwrite.addAttribute("value", overwriteCheckbox.isSelected() ? TRUE : FALSE);
Element mergeType = ((Element) arg0).addElement("merge_type");
mergeType.addAttribute("value", mergeTypeCheck.isSelected() ? TRUE : FALSE);
Element fileCompress = ((Element) arg0).addElement("compressed");
fileCompress.addAttribute("value", outputCompressedCheck.isSelected() ? TRUE : FALSE);
Element pdfVersion = ((Element) arg0).addElement("pdfversion");
pdfVersion.addAttribute("value", ((StringItem) versionCombo.getSelectedItem()).getId());
}
return arg0;
} catch (Exception ex) {
throw new SaveJobException(ex);
}