Package org.openntf.domino

Examples of org.openntf.domino.Session


    sb.append("Last accessed: " + format.format(doc.getLastAccessedDate()));
    ExtLibUtil.getViewScope().put("javaTest", sb.toString());
  }

  public void getFormName() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Document doc = contacts.getFirstDocument();
    ExtLibUtil.getViewScope().put("javaTest", doc.getFormName());
  }
View Full Code Here


    Document doc = contacts.getFirstDocument();
    ExtLibUtil.getViewScope().put("javaTest", doc.getFormName());
  }

  public void getForm() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Document doc = contacts.getFirstDocument();
    ExtLibUtil.getViewScope().put("javaTest", doc.getForm().getNoteID());
  }
View Full Code Here

    Document doc = contacts.getFirstDocument();
    ExtLibUtil.getViewScope().put("javaTest", doc.getForm().getNoteID());
  }

  public void replaceItemValueSummary() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    StringBuilder sb = new StringBuilder();
    sb.append("Here is a value");
View Full Code Here

    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("summaryField") + " " + Boolean.toString(itm.isSummary()));
  }

  public void createNathan() {
    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());
View Full Code Here

    contact.save();
    ExtLibUtil.getViewScope().put("javaTest", contact.getNoteID());
  }

  public void createPaul() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    Utils.addAllListeners(currDb);
    HashMap<String, Object> fieldsMap = new HashMap<String, Object>();
    fieldsMap.put("Form", "Contact");
    fieldsMap.put("FirstName", "Paul");
    fieldsMap.put("LastName", "Withers");
View Full Code Here

    this.session = s;
    this.database = d;
  }

  public static void main(final String[] args) {
    Session s = null;
    Database d = null;
    NotesThread.sinitThread();
    try {
      s = Factory.getSession();
      d = s.getDatabase("heracles/intec-pw", "OpenNTF\\OpenNTFDomino.nsf");
      SimpleEmailTest a = new SimpleEmailTest(s, d);
      a.NotesMain();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
View Full Code Here

    contact.save();
    ExtLibUtil.getViewScope().put("javaTest", contact.getNoteID());
  }

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

    }
  }

  @SuppressWarnings("unused")
  public void NotesMain() {
    Session session;
    Database database;

    // Fails on checking current database!!

    try {
      Session s;
      Database db;
      if (this.session != null) {
        s = this.session;
        db = this.database;
        DominoEmail myEmail = new DominoEmail();
View Full Code Here

    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("javaDateField"));
  }

  public void setFormulaField() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    Formula fm = new Formula("@DocumentUniqueID");
    doc.put("javaFormulaField", "Document UNID is " + fm.getValue(doc));
View Full Code Here

    doc.save(true, false);
    ExtLibUtil.getViewScope().put("javaTest", doc.get("javaFormulaField"));
  }

  public void setDocumentCollectionField() {
    Session s = Factory.getSession();
    Database currDb = s.getCurrentDatabase();
    View contacts = currDb.getView("AllContacts");
    View contactsByState = currDb.getView("AllContactsByState");
    Utils.addAllListeners(currDb);
    Document doc = contacts.getFirstDocument();
    DocumentCollection dc = contactsByState.getAllDocumentsByKey("CA", true);
View Full Code Here

TOP

Related Classes of org.openntf.domino.Session

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.