Package org.openntf.domino

Examples of org.openntf.domino.NoteCollection


    if (DominoUtils.isUnid(name)) {
      Document doc = database_.getDocumentByUNID(name);
      return new Folder(doc);
    } else {
      // TODO Check if this returns views
      NoteCollection notes = getNoteCollection(
          String.format(" @Explode($TITLE; '|')=\"%s\" ", DominoUtils.escapeForFormulaString(name)),
          EnumSet.of(SelectOption.VIEWS));

      String noteId = notes.getFirstNoteID();
      if (!noteId.isEmpty()) {
        Document doc = database_.getDocumentByID(noteId);
        return new Folder(doc);
      }
    }
View Full Code Here


    return null;
  }

  @Override
  public DesignCollection<org.openntf.domino.design.Folder> getFolders() {
    NoteCollection notes = getNoteCollection(" @All ", EnumSet.of(SelectOption.VIEWS));
    return new DesignCollection<org.openntf.domino.design.Folder>(notes, Folder.class);
  }
View Full Code Here

    return new DesignCollection<org.openntf.domino.design.Folder>(notes, Folder.class);
  }

  @Override
  public DesignCollection<org.openntf.domino.design.JavaScriptLibrary> getJavaScriptLibraries() {
    NoteCollection notes = getNoteCollection(" @Contains($Flags; 'j') ", EnumSet.of(SelectOption.SCRIPT_LIBRARIES));
    return new DesignCollection<org.openntf.domino.design.JavaScriptLibrary>(notes, JavaScriptLibrary.class);
  }
View Full Code Here

  public JavaScriptLibrary getJavaScriptLibrary(final String name) {
    if (DominoUtils.isUnid(name)) {
      Document doc = database_.getDocumentByUNID(name);
      return new JavaScriptLibrary(doc);
    } else {
      NoteCollection notes = getNoteCollection(
          String.format(" @Contains($Flags; 'j') & @Explode($TITLE; '|')=\"%s\" ", DominoUtils.escapeForFormulaString(name)),
          EnumSet.of(SelectOption.SCRIPT_LIBRARIES));

      String noteId = notes.getFirstNoteID();
      if (!noteId.isEmpty()) {
        Document doc = database_.getDocumentByID(noteId);
        return new JavaScriptLibrary(doc);
      }
    }
View Full Code Here

  public DatabaseClassLoader getDatabaseClassLoader(final ClassLoader parent, final boolean includeJars, final boolean includeLibraries) {
    return new DatabaseClassLoader(this, parent, includeJars, includeLibraries);
  }

  protected NoteCollection getNoteCollection(final String selectionFormula, final Set<SelectOption> options) {
    NoteCollection notes = database_.createNoteCollection(false);
    notes.setSelectOptions(options);
    notes.setSelectionFormula(selectionFormula);
    notes.buildCollection();
    return notes;
  }
View Full Code Here

    int[] result = null;
    if (collection != null) {
      if (collection instanceof DocumentList) {
        result = ((DocumentList) collection).getNids();
      } else {
        NoteCollection nc = null;
        try {
          Database db = collection.getParent();
          setDatabase(db);
          nc = org.openntf.domino.impl.DocumentCollection.toLotusNoteCollection(collection);
          if (nc.getCount() > 0) {
            result = nc.getNoteIDs();
          } else {
            if (log_.isLoggable(Level.FINER)) {
              log_.log(Level.FINER, "Attempted to get id array of empty DocumentCollection");
            }
          }
View Full Code Here

TOP

Related Classes of org.openntf.domino.NoteCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.