Package org.openntf.domino

Examples of org.openntf.domino.Session


    // whatever you might want to do in your constructor, but stay away from Domino objects
  }

  public void run2() {
    long testStartTime = System.nanoTime();
    Session session = this.getSession();
    try {
      Database db = session.getDatabase("", "imdb/movies.nsf");
      //      db.setDelayUpdates(true);
      marktime = System.nanoTime();
      timelog("Beginning view build...");
      View byLength = db.getView("byLength");
      View btitles = db.createView("BTitles", "@Begins(Title; \"B\")", byLength);
View Full Code Here


    run1();
  }

  public void run1() {
    long testStartTime = System.nanoTime();
    Session session = this.getSession();
    Database log = session.getDatabase("", "log.nsf");
    Document storeTest = log.createDocument();
    storeTest.replaceItemValue("form", "BinaryTest");
    Database db = session.getDatabase("", "imdb/movies.nsf");

    try {
      NoteList notelist = new NoteList();
      marktime = System.nanoTime();
      timelog("Beginning first notelist...");
View Full Code Here

    System.out.println("Completed " + getClass().getSimpleName() + " run in " + ((testEndTime - testStartTime) / 1000000) + " ms");
  }

  protected Session getSession() {
    try {
      Session session = Factory.fromLotus(NotesFactory.createSession(), Session.class, null);
      return session;
    } catch (Throwable t) {
      DominoUtils.handleException(t);
      return null;
    }
View Full Code Here

      scanner.setTrackFieldTokens(true);
      scanner.setTrackFieldTypes(false);
      scanner.setTrackFieldValues(false);
      scanner.setTrackTokenFreq(false);

      Session s = Factory.getSession();
      Database db = s.getDatabase("", "help/help9_admin.nsf");
      System.out.println("Beginning scan of " + db.getApiPath());
      for (Document doc : db.getAllDocuments()) {
        scanner.processDocument(doc);
        docCount++;
      }
View Full Code Here

public class NewNameBean implements Serializable {
  private static final long serialVersionUID = 1L;

  public void getGroups() {
    Session currSess = Factory.getSession();
    Name currName = currSess.createName(currSess.getEffectiveUserName());
    ExtLibUtil.getViewScope().put("javaTest", currName.getGroups(currSess.getServerName()));
  }
View Full Code Here

    ExtLibUtil.getViewScope().put("javaTest", currName.getGroups(currSess.getServerName()));
  }

  public void getNameParts() {
    StringBuilder sb = new StringBuilder();
    Session currSess = Factory.getSession();
    Name currName = currSess.createName(currSess.getEffectiveUserName());
    sb.append("Abbreviated: " + currName.getNamePart(Key.Abbreviated));
    sb.append("<br/>Addr821: " + currName.getNamePart(Key.Addr821));
    sb.append("<br/>Addr822Comment1: " + currName.getNamePart(Key.Addr822Comment1));
    sb.append("<br/>Addr822Comment2: " + currName.getNamePart(Key.Addr822Comment2));
    sb.append("<br/>Addr822Comment3: " + currName.getNamePart(Key.Addr822Comment3));
View Full Code Here

      System.out.println("ENDING ITERATION of Forms");
    }

    private void iterateAllDocuments(final Set<Document> secondReference) {
      System.out.println("Thread " + Thread.currentThread().getName() + " BEGINNING ITERATION of Documents");
      @SuppressWarnings("unused")
      Session s = db.getParent();
      org.openntf.domino.transactions.DatabaseTransaction txn = db.startTransaction();
      DocumentCollection dc = db.getAllDocuments();
      for (Document doc : dc) {
        docCount++;
View Full Code Here

    public void run() {
      // System.out.println("com class is loaded = " + String.valueOf(com.isLoaded()));

      // if (false) {
      long start = System.nanoTime();
      Session s = Factory.getSessionFullAccess();
      RunContext rc = Factory.getRunContext();
      System.out.println("RunContext: " + rc.toString());
      Name sname = s.getUserNameObject();
      DateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
      System.out.println(df.format(new Date()) + " Name: " + sname.getCanonical());
      db = s.getDatabase(server, dbPath);
      if (INCLUDE_FORMS) {
        iterateForms(db);
      }
      Set<Document> secondReference = new HashSet<Document>();
      iterateAllDocuments(secondReference);
View Full Code Here

    public void run() {
      long start = System.nanoTime();
      DateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
      int docCount = 0;

      Session s = Factory.getSession();
      Database db = s.getDatabase("", "names.nsf");
      for (Document doc : db.getAllDocuments()) {
        String json = doc.toJson(false);
        System.out.println(json);
        docCount++;
        if (docCount > 30) {
View Full Code Here

    // whatever you might want to do in your constructor, but stay away from Domino objects
  }

  @Override
  public void run() {
    Session session = this.getSession();
    Database db = session.getDatabase("", "log.nsf");
    try {
      DatabaseSchema schema = new DatabaseSchema();
      DocumentDefinition eventDef = new DocumentDefinition();
      eventDef.setName("Events");
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.