Search in sources :

Example 1 with NoteCollection

use of org.openntf.domino.NoteCollection in project org.openntf.domino by OpenNTF.

the class Database method getLocalNoteList.

public LocalNoteList getLocalNoteList() {
    Set<SelectOption> noteClass = new java.util.HashSet<SelectOption>();
    noteClass.add(SelectOption.DOCUMENTS);
    NoteCollection nc = createNoteCollection(false);
    nc.setSelectOptions(noteClass);
    nc.buildCollection();
    LocalNoteList result = new org.openntf.domino.big.impl.LocalNoteList(nc, new Date());
    return result;
}
Also used : SelectOption(org.openntf.domino.NoteCollection.SelectOption) NoteCollection(org.openntf.domino.NoteCollection) LocalNoteList(org.openntf.domino.big.LocalNoteList) Date(java.util.Date) HashSet(java.util.HashSet)

Example 2 with NoteCollection

use of org.openntf.domino.NoteCollection in project org.openntf.domino by OpenNTF.

the class Database method getModifiedNoteCount.

/*
	 * (non-Javadoc)
	 *
	 * @see org.openntf.domino.ext.Database#getModifiedNoteCount(lotus.domino.DateTime, org.openntf.domino.NoteCollection.SelectOption)
	 */
@Override
public int getModifiedNoteCount(final java.util.Date since, final Set<SelectOption> noteClass) {
    if (since != null && since.after(this.getLastModifiedDate())) {
        return 0;
    }
    NoteCollection nc = createNoteCollection(false);
    if (since != null) {
        nc.setSinceTime(since);
    }
    nc.setSelectOptions(noteClass);
    nc.buildCollection();
    return nc.getCount();
}
Also used : NoteCollection(org.openntf.domino.NoteCollection)

Example 3 with NoteCollection

use of org.openntf.domino.NoteCollection in project org.openntf.domino by OpenNTF.

the class Agent method getProfileResults.

@Override
public org.openntf.domino.Document getProfileResults() {
    try {
        if (isProfiled()) {
            NoteCollection nc = getParent().createNoteCollection(false);
            String subject = " Profile";
            if (getName().contains("|")) {
                subject = Strings.left(getName(), "|") + subject;
            } else {
                if (getName().contains("(")) {
                    subject = Strings.right(Strings.left(getName(), ")"), "(") + subject;
                } else {
                    subject = getName() + subject;
                }
            }
            nc.setSelectProfiles(true);
            nc.setSelectionFormula("Form=\"$BEProfileR7\" & Subject=\"" + subject + "\"");
            nc.buildCollection();
            if (!Strings.isBlankString(nc.getFirstNoteID())) {
                return getParent().getDocumentByID(nc.getFirstNoteID());
            }
        }
        return null;
    } catch (Exception e) {
        DominoUtils.handleException(e);
        return null;
    }
}
Also used : NoteCollection(org.openntf.domino.NoteCollection) IOException(java.io.IOException) InvalidClassException(java.io.InvalidClassException) NotesException(lotus.domino.NotesException)

Example 4 with NoteCollection

use of org.openntf.domino.NoteCollection in project org.openntf.domino by OpenNTF.

the class Agent method getUniversalID.

/*
	 * (non-Javadoc)
	 *
	 * @see org.openntf.domino.types.Design#getUniversalID()
	 */
@Override
public String getUniversalID() {
    NoteCollection notes = parent.createNoteCollection(false);
    notes.add(this);
    return notes.getUNID(notes.getFirstNoteID());
}
Also used : NoteCollection(org.openntf.domino.NoteCollection)

Example 5 with NoteCollection

use of org.openntf.domino.NoteCollection in project org.openntf.domino by OpenNTF.

the class Agent method getNoteID.

/*
	 * (non-Javadoc)
	 *
	 * @see org.openntf.domino.types.Design#getNoteID()
	 */
@Override
public String getNoteID() {
    NoteCollection notes = parent.createNoteCollection(false);
    notes.add(this);
    return notes.getFirstNoteID();
}
Also used : NoteCollection(org.openntf.domino.NoteCollection)

Aggregations

NoteCollection (org.openntf.domino.NoteCollection)29 Database (org.openntf.domino.Database)11 NoteCoordinate (org.openntf.domino.big.NoteCoordinate)6 Document (org.openntf.domino.Document)5 FastTable (javolution.util.FastTable)4 Session (org.openntf.domino.Session)4 SelectOption (org.openntf.domino.NoteCollection.SelectOption)3 IOException (java.io.IOException)2 NotesException (lotus.domino.NotesException)2 DocumentCollection (org.openntf.domino.DocumentCollection)2 JsonException (com.ibm.commons.util.io.json.JsonException)1 InvalidClassException (java.io.InvalidClassException)1 Serializable (java.io.Serializable)1 Method (java.lang.reflect.Method)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 Test (org.junit.Test)1