Search in sources :

Example 6 with DominoException

use of com.darwino.domino.napi.DominoException in project org.openntf.nsfodp by OpenNTF.

the class DarwinoNDXLExporter method export.

@Override
public void export(NDatabase database, Collection<Integer> noteIds, OutputStream os) {
    try {
        NSFDatabase db = ((DarwinoNDatabase) database).getNSFDatabase();
        NSFNoteIDCollection coll = db.getParent().createNoteIDCollection();
        try {
            coll.addAll(noteIds);
            this.exporter.export(db, coll, os);
        } finally {
            coll.free();
        }
    } catch (DominoException e) {
        throw new NDominoException(e.getStatus(), e);
    }
}
Also used : NDominoException(org.openntf.nsfodp.commons.odp.notesapi.NDominoException) NSFNoteIDCollection(com.darwino.domino.napi.wrap.NSFNoteIDCollection) NSFDatabase(com.darwino.domino.napi.wrap.NSFDatabase) DominoException(com.darwino.domino.napi.DominoException) NDominoException(org.openntf.nsfodp.commons.odp.notesapi.NDominoException)

Example 7 with DominoException

use of com.darwino.domino.napi.DominoException in project org.openntf.nsfodp by OpenNTF.

the class DarwinoNotesAPI method createDXLImporter.

@Override
public NDXLImporter createDXLImporter() {
    try {
        NSFDXLImporter importer = session.createDXLImporter();
        importer.setDesignImportOption(DXLIMPORTOPTION.CREATE);
        importer.setACLImportOption(DXLIMPORTOPTION.REPLACE_ELSE_IGNORE);
        importer.setReplaceDBProperties(true);
        importer.setReplicaRequiredForReplaceOrUpdate(false);
        return new DarwinoNDXLImporter(importer);
    } catch (DominoException e) {
        throw new NDominoException(e.getStatus(), e);
    }
}
Also used : NDominoException(org.openntf.nsfodp.commons.odp.notesapi.NDominoException) NSFDXLImporter(com.darwino.domino.napi.wrap.NSFDXLImporter) DominoException(com.darwino.domino.napi.DominoException) NDominoException(org.openntf.nsfodp.commons.odp.notesapi.NDominoException)

Aggregations

DominoException (com.darwino.domino.napi.DominoException)7 NDominoException (org.openntf.nsfodp.commons.odp.notesapi.NDominoException)6 NSFSEARCHPROC (com.darwino.domino.napi.proc.NSFSEARCHPROC)1 SEARCH_MATCH (com.darwino.domino.napi.struct.SEARCH_MATCH)1 FormulaException (com.darwino.domino.napi.wrap.FormulaException)1 NSFDXLExporter (com.darwino.domino.napi.wrap.NSFDXLExporter)1 NSFDXLImporter (com.darwino.domino.napi.wrap.NSFDXLImporter)1 NSFDatabase (com.darwino.domino.napi.wrap.NSFDatabase)1 NSFNote (com.darwino.domino.napi.wrap.NSFNote)1 NSFNoteIDCollection (com.darwino.domino.napi.wrap.NSFNoteIDCollection)1 NotesAPIException (com.ibm.designer.domino.napi.NotesAPIException)1 NotesDatabase (com.ibm.designer.domino.napi.NotesDatabase)1 NotesNote (com.ibm.designer.domino.napi.NotesNote)1 NotesSession (com.ibm.designer.domino.napi.NotesSession)1 Path (java.nio.file.Path)1 NNote (org.openntf.nsfodp.commons.odp.notesapi.NNote)1