Package org.openntf.domino

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


  }

  void createUser(Database db, String id, String firstName, String lastName, String city, String state, String email) {
    Document doc = db.createDocument("Form", "Contact", "Id", id, "FirstName", firstName, "LastName", lastName,
        "City", city, "State", state, "email", email);
    doc.save();
  }

  String createEmail(String firstName, String lastName, String city) {
    StringBuilder b = new StringBuilder();
    for (int i = 0; i < firstName.length(); i++) {
View Full Code Here


  }

  void createState(Database db, String key, String name) {
    Document doc = db.createDocument("Form", "State", "Key", key, "Name", name);
    doc.save();
  }

  // ===================================================================
  // Discussion
  // ===================================================================
View Full Code Here

      doc.replaceItemValue("Date", date);
      if (parent != null) {
        doc.makeResponse(parent);
      }
      doc.computeWithForm(false, false);
      doc.save();

      if (pos.length < disc_maxDepth) {
        double r = Math.random();
        if (r <= (1.0 / pos.length)) {
          int[] newPos = new int[pos.length + 1];
View Full Code Here

    mdg.add("dlgx_" + sIndex + "_1");
    mdg.add("dlgx_" + sIndex + "_1");
    mdg.add("dlgx_" + sIndex + "_1");
    doc.put("fldDialogList2", mdg);

    doc.save();
  }

  protected Date createDate(int year, int month, int day) {
    Calendar c1 = GregorianCalendar.getInstance();
    c1.set(year, month, day);
View Full Code Here

      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);
    } catch (Exception e) {
View Full Code Here

    if (!doc.hasItem("documentToggle")) {
      doc.put("documentToggle", true);
    } else {
      doc.put("documentToggle", null);
    }
    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("documentToggle"));
  }

  public void containsCheckItems() {
    StringBuilder sb = new StringBuilder();
View Full Code Here

    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() {
    Session s = Factory.getSession();
View Full Code Here

    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    Utils.addAllListeners(currDb);
    Document contact = currDb.createDocument("Form", "Contact", "FirstName", "Nathan", "LastName", "Freeman",
        "Email", "godOfAwesome@worldOfAweso.me", "City", "Washington", "State", "WA");
    contact.save();
    ExtLibUtil.getViewScope().put("javaTest", contact.getNoteID());
  }

  public void createPaul() {
    Session s = Factory.getSession();
View Full Code Here

    fieldsMap.put("LastName", "Withers");
    fieldsMap.put("Email", "lordOfPrettyGood@worldOfAweso.me");
    fieldsMap.put("City", "Washington");
    fieldsMap.put("State", "WA");
    Document contact = currDb.createDocument(fieldsMap);
    contact.save();
    ExtLibUtil.getViewScope().put("javaTest", contact.getNoteID());
  }

  public void setDateField() {
    Session s = Factory.getSession();
View Full Code Here

    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    doc.put("javaDateField", new Date());
    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("javaDateField"));
  }

  public void setFormulaField() {
    Session s = Factory.getSession();
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.