Package org.openntf.domino

Examples of org.openntf.domino.Document.replaceItemValue()


    String[] loremIpsum = SampleDataUtil.readLoremIpsum();
    for (int j = 0; j < nDoc; j++) {
      pos[pos.length - 1] = j + 1;

      Document doc = db.createDocument();
      doc.replaceItemValue("Form", "Discussion");
      StringBuilder b = new StringBuilder();
      for (int i = 0; i < pos.length; i++) {
        if (i > 0) {
          b.append("/");
        }
View Full Code Here


      // Get a random author
      int x = Math.min((int) (Math.random() * (users.size())), users.size());
      String author = users.get(x);

      doc.replaceItemValue("Title", title);
      doc.replaceItemValue("Body", body);
      doc.replaceItemValue("Author", author);
      doc.replaceItemValue("Date", date);
      if (parent != null) {
        doc.makeResponse(parent);
View Full Code Here

      // Get a random author
      int x = Math.min((int) (Math.random() * (users.size())), users.size());
      String author = users.get(x);

      doc.replaceItemValue("Title", title);
      doc.replaceItemValue("Body", body);
      doc.replaceItemValue("Author", author);
      doc.replaceItemValue("Date", date);
      if (parent != null) {
        doc.makeResponse(parent);
      }
View Full Code Here

      int x = Math.min((int) (Math.random() * (users.size())), users.size());
      String author = users.get(x);

      doc.replaceItemValue("Title", title);
      doc.replaceItemValue("Body", body);
      doc.replaceItemValue("Author", author);
      doc.replaceItemValue("Date", date);
      if (parent != null) {
        doc.makeResponse(parent);
      }
      doc.computeWithForm(false, false);
View Full Code Here

      String author = users.get(x);

      doc.replaceItemValue("Title", title);
      doc.replaceItemValue("Body", body);
      doc.replaceItemValue("Author", author);
      doc.replaceItemValue("Date", date);
      if (parent != null) {
        doc.makeResponse(parent);
      }
      doc.computeWithForm(false, false);
      doc.save();
View Full Code Here

      Utils.addAllListeners(currDb);
      View contactsView = currDb.getView("AllContacts");
      for (ViewEntry ent : contactsView.getAllEntries()) {
        DateTime dt = currSess.createDateTime(new Date());
        Document doc = ent.getDocument();
        doc.replaceItemValue("testDate", dt);
        doc.save(true, false);
      }
      date = new Date();
      retVal += "<br/>Finished OpenNTF version..." + date.toString();
      ExtLibUtil.getViewScope().put("SSJSTest", retVal);
View Full Code Here

        return;
      }
      sb.append("Starting update with " + selVal);
      View view = db.getView("allStates");
      Document state = view.getFirstDocumentByKey(selVal, true);
      state.replaceItemValue("txnTest", new Date());
      sb.append("...Updated State pending committal, value is " + state.get("txnTest").toString());
      View contacts = db.getView("AllContactsByState");
      DocumentCollection dc = contacts.getAllDocumentsByKey(selVal, true);
      for (Document doc : dc) {
        if (toggle) {
View Full Code Here

    View contacts = currDb.getView("AllContacts");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    StringBuilder sb = new StringBuilder();
    sb.append("Here is a value");
    Item itm = doc.replaceItemValue("summaryField", sb, true);
    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("summaryField") + " " + Boolean.toString(itm.isSummary()));
  }

  public void createNathan() {
View Full Code Here

              }
              if (rawReleaseDate.length() > 3 && !rawReleaseDate.startsWith("?")) {
                releaseYear = Integer.valueOf(rawReleaseDate.substring(0, 4).trim());
              }
              Document doc = db.getDocumentWithKey(entryKey, true);
              doc.replaceItemValue("StartDate", expectedFilmDate);
              doc.replaceItemValue("Title", expectedTitle);
              doc.replaceItemValue("Type", entryType);
              doc.replaceItemValue("EpisodeTitle", episodeTitle);
              doc.replaceItemValue("EpisodeNumber", episodeNumber);
              doc.replaceItemValue("SeasonNumber", seasonNumber);
View Full Code Here

              if (rawReleaseDate.length() > 3 && !rawReleaseDate.startsWith("?")) {
                releaseYear = Integer.valueOf(rawReleaseDate.substring(0, 4).trim());
              }
              Document doc = db.getDocumentWithKey(entryKey, true);
              doc.replaceItemValue("StartDate", expectedFilmDate);
              doc.replaceItemValue("Title", expectedTitle);
              doc.replaceItemValue("Type", entryType);
              doc.replaceItemValue("EpisodeTitle", episodeTitle);
              doc.replaceItemValue("EpisodeNumber", episodeNumber);
              doc.replaceItemValue("SeasonNumber", seasonNumber);
              doc.replaceItemValue("ShowNumber", showNumber);
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.