Examples of NoteCollection


Examples of org.openntf.domino.NoteCollection

   *
   * @see org.openntf.domino.types.Design#getNoteID()
   */
  @Override
  public String getNoteID() {
    NoteCollection notes = this.getParent().createNoteCollection(false);
    notes.add(this);
    return notes.getFirstNoteID();
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

   *
   * @see org.openntf.domino.types.Design#getUniversalID()
   */
  @Override
  public String getUniversalID() {
    NoteCollection notes = this.getParent().createNoteCollection(false);
    notes.add(this);
    return notes.getUNID(notes.getFirstNoteID());
  }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

    }

    String binaryName = DominoUtils.escapeForFormulaString(DominoUtils.javaBinaryNameToFilePath(name, "/"));

    // Check for appropriate design elements in the DB
    NoteCollection notes = design_.getNoteCollection(String.format(
        " @Contains($Flags; 'g') & (@Contains($Flags; '[') | @Contains($Flags; 'K')) & $ClassIndexItem='WEB-INF/classes/%s' ",
        binaryName), EnumSet.of(SelectOption.MISC_FORMAT));
    String noteId = notes.getFirstNoteID();
    if (!noteId.isEmpty()) {
      Document doc = design_.getAncestorDatabase().getDocumentByID(noteId);
      JavaResource res = new JavaResource(doc);
      // Load up our class queue with the data
      unloadedClasses_.putAll(res.getClassData());
      // Now attempt to load the named class
      byte[] classData = unloadedClasses_.remove(name);
      if (classData != null) {
        // It's possible that an old name of the Java class is still lingering in the NSF
        // In that case, we'd reach this point, but not have an actual class available to load
        return defineClass(name, classData, 0, classData.length);
      }
    }

    // It's also possible that it's stored only as a .class file (e.g. secondary, non-inner classes in a .java)
    notes = design_.getNoteCollection(
        String.format(" @Contains($Flags; 'g') & @Contains($Flags; 'C') & $FileNames='WEB-INF/classes/%s' ", binaryName),
        EnumSet.of(SelectOption.MISC_FORMAT));
    noteId = notes.getFirstNoteID();
    if (!noteId.isEmpty()) {
      Document doc = design_.getAncestorDatabase().getDocumentByID(noteId);
      FileResource res = new FileResource(doc);
      byte[] classData = res.getFileData();
      return defineClass(name, classData, 0, classData.length);
View Full Code Here

Examples of org.openntf.domino.NoteCollection

  /* (non-Javadoc)
   * @see org.openntf.domino.design.DatabaseDesign#getFacesConfig()
   */
  @Override
  public FacesConfig getFacesConfig() {
    NoteCollection notes = getNoteCollection(" @Contains($Flags; 'g') & @Explode($TITLE; '|')='WEB-INF/faces-config.xml'",
        EnumSet.of(SelectOption.MISC_FORMAT));
    String noteId = notes.getFirstNoteID();
    if (!noteId.isEmpty()) {
      Document doc = database_.getDocumentByID(noteId);
      return new FacesConfig(doc);
    }
    return null;
View Full Code Here

Examples of org.openntf.domino.NoteCollection

  public FileResource getFileResource(final String name) {
    if (DominoUtils.isUnid(name)) {
      Document doc = database_.getDocumentByUNID(name);
      return new FileResource(doc);
    } else {
      NoteCollection notes = getNoteCollection(
          String.format(" !@Contains($Flags; '~') & @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

Examples of org.openntf.domino.NoteCollection

    return null;
  }

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

Examples of org.openntf.domino.NoteCollection

  public FileResource getHiddenFileResource(final String name) {
    if (DominoUtils.isUnid(name)) {
      Document doc = database_.getDocumentByUNID(name);
      return new FileResource(doc);
    } else {
      NoteCollection notes = getNoteCollection(
          String.format(
              " @Contains($Flags; '~') & @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 FileResource(doc);
      }
    }
View Full Code Here

Examples of org.openntf.domino.NoteCollection

    return null;
  }

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

Examples of org.openntf.domino.NoteCollection

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

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

Examples of org.openntf.domino.NoteCollection

  /* (non-Javadoc)
   * @see org.openntf.domino.design.DatabaseDesign#getImageResources()
   */
  @Override
  public org.openntf.domino.design.DesignCollection<org.openntf.domino.design.ImageResource> getImageResources() {
    NoteCollection notes = getNoteCollection(" @Contains($Flags; 'i') ", EnumSet.of(SelectOption.IMAGE_RESOURCES));
    return new DesignCollection<org.openntf.domino.design.ImageResource>(notes, ImageResource.class);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.