return getAncestorDatabase().getAncestorSession();
}
@Override
public boolean save() {
DxlImporter importer = null;
try {
importer = getAncestorSession().createDxlImporter();
importer.setDesignImportOption(DxlImporter.DesignImportOption.REPLACE_ELSE_CREATE);
importer.setReplicaRequiredForReplaceOrUpdate(false);
Database database = getAncestorDatabase();
importer.importDxl(getDxl().getXml(), database);
noteId_ = importer.getFirstImportedNoteID();
// Reset the DXL so that it can pick up new noteinfo
Document document = database.getDocumentByID(noteId_);
DxlExporter exporter = getAncestorSession().createDxlExporter();
exporter.setForceNoteFormat(true);
exporter.setOutputDOCTYPE(false);
loadDxl(exporter.exportDxl(document));
} catch (IOException e) {
DominoUtils.handleException(e);
if (importer != null) {
System.out.println(importer.getLog());
}
return false;
}
return true;
}