Package org.openntf.domino

Examples of org.openntf.domino.NoteCollection


    // TODO Decide if it's worth going through the result to remove class names that don't actually
    //   exist in their notes. This happens when a Java class is renamed - Domino retains the old name
    //  in $ClassIndexItem for some reason

    SortedSet<String> result = new TreeSet<String>();
    NoteCollection notes = getNoteCollection(" @Contains($Flags; 'g') & @Contains($Flags; '[') ", EnumSet.of(SelectOption.MISC_FORMAT));
    for (String noteId : notes) {
      Document doc = getAncestorDatabase().getDocumentByID(noteId);
      for (Object pathName : doc.getItemValue("$ClassIndexItem")) {
        if (pathName != null && String.valueOf(pathName).startsWith("WEB-INF/classes/")) {
          result.add(DominoUtils.filePathToJavaBinaryName(((String) pathName).substring(16), "/"));
View Full Code Here


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

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

   *
   * @see org.openntf.domino.design.DatabaseDesign#getXPages()
   */
  @Override
  public DesignCollection<org.openntf.domino.design.XPage> getXPages() {
    NoteCollection notes = getNoteCollection(" @Contains($Flags; 'g') & @Contains($Flags; 'K') ", EnumSet.of(SelectOption.MISC_FORMAT));
    return new DesignCollection<org.openntf.domino.design.XPage>(notes, XPage.class);
  }
View Full Code Here

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

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

    return null;
  }

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

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

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

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

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

    return null;
  }

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

    if (DominoUtils.isUnid(name)) {
      Document doc = database_.getDocumentByUNID(name);
      return new DesignView(doc);
    } else {
      // TODO Check if this returns folders
      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 DesignView(doc);
      }
    }
View Full Code Here

    return null;
  }

  @Override
  public DesignCollection<org.openntf.domino.design.DesignView> getViews() {
    NoteCollection notes = getNoteCollection(" @All ", EnumSet.of(SelectOption.VIEWS));
    return new DesignCollection<org.openntf.domino.design.DesignView>(notes, DesignView.class);
  }
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.