Package lotus.domino

Examples of lotus.domino.Session


      time = System.currentTimeMillis() - time;
      System.err.println("[FormulaEngine] 10000x evaluating AST tree\ttook " + time + "ms.");

      System.out.println("Result:\t" + v);

      Session sess = Base.toLotus(Factory.getSession());
      @SuppressWarnings("unused")
      long startEvaluate = System.currentTimeMillis();
      try {
        time = System.currentTimeMillis();
        for (int i = 1; i < 10000; i++) {
          v = sess.evaluate(str);
        }
        time = System.currentTimeMillis() - time;
        System.err.println("[NotesNative] 10000x calling session.evaluate\ttook " + time + "ms.");
        System.out.println("Result:\t" + v);
View Full Code Here


  public static Map getViewScope() {
    return (Map) resolveVariable("viewScope");
  }
 
  public static Name getCurrentUser() {
    Session session = getSession();
    try {
      return session.createName(session.getEffectiveUserName());
    } catch (NotesException e) {
      e.printStackTrace();
      return null;
    }     
  }
View Full Code Here

  }
 
  public boolean saveState(Database db) throws NotesException {
    boolean result;
   
    Session session=db.getParent();
    DateTime someDate;
   
    Document feedDoc = db.getDocumentByID(noteId);
   
    if(getLastTry()!=null) {
      someDate=session.createDateTime(getLastTry());
      feedDoc.replaceItemValue("BLastTry", someDate);
      someDate.recycle();
    } else {
      feedDoc.replaceItemValue("BLastTry", "");
    }
   
    if(getLastSuccess()!=null) {
      someDate=session.createDateTime(getLastSuccess());
      feedDoc.replaceItemValue("BLastSuccess", someDate);
      someDate.recycle();
    } else {
      feedDoc.replaceItemValue("BLastSuccess", "");
    }
   
    if(getLastError()!=null) {
      someDate=session.createDateTime(getLastError());
      feedDoc.replaceItemValue("BLastError", someDate);
      someDate.recycle();
    } else {
      feedDoc.replaceItemValue("BLastError", "");
    }
View Full Code Here

    try {
      DateTime someDate=null;
     
      setCreationDate(Calendar.getInstance());
     
      Session session=db.getParent();
     
      Document storyDoc = db.createDocument();
      storyDoc.replaceItemValue("Form", "News");
      storyDoc.replaceItemValue("NID", Utilities.generateUniqueId());       
     
      if(isRedirectEnabled()) {
        try {
          setLink(Utilities.followRedirect(getLink()));
        } catch (IOException e) {
          throw new StoryReaderException(Constants.EXCEPTION_COMM_ERROR + ": "+getLink());
        }
      }

      storyDoc.replaceItemValue("NLink", getLink());

      someDate=session.createDateTime(getCreationDate());
      storyDoc.replaceItemValue("NCreationDate", someDate);
      someDate.recycle();

      someDate=session.createDateTime(getDate());
      storyDoc.replaceItemValue("NPublicationDate", someDate);
      someDate.recycle();
     
      storyDoc.replaceItemValue("NTitle", getTitle());
      storyDoc.replaceItemValue("NAbstract", getAbstractContent());
View Full Code Here

     
            // Getting the first spreadsheet.
            XSpreadsheet xSpreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(
                XSpreadsheet.class, xIndexAccess.getByIndex(0));
     
            Session session;
            if ( !stringHost.equals( "" ) ) {
                // Creating a Notes session for remote calls to the Domino classes.
                session = NotesFactory.createSession(stringHost, stringUser,
                                                     stringPassword);
            }
            else {
                // Creating a Notes session for only local calls to the
                // Domino classes.
                session = NotesFactory.createSession();
            }
     
            // Getting the specified Notes database.
            Database database = session.getDatabase( "", stringDatabase );
           
            // Getting a collection of all documents from the database.
            DocumentCollection documentCollection = database.getAllDocuments();
     
            // Getting the first document from the database
View Full Code Here

     
      // Getting the first spreadsheet.
      XSpreadsheet xspreadsheet = ( XSpreadsheet ) UnoRuntime.queryInterface(
          XSpreadsheet.class, xindexaccess.getByIndex( 0 ));
     
      Session session;
      if ( !stringHost.equals( "" ) ) {
        // Creating a Notes session for remote calls to the Domino classes.
        session = NotesFactory.createSession( stringHost, stringUser,
        stringPassword );
      }
      else {
        // Creating a Notes session for only local calls to the Domino classes.
        session = NotesFactory.createSession();
      }
     
      // Getting the specified Notes database.
      Database database = session.getDatabase( "", stringDatabase );
     
      // Getting a collection of all documents from the database.
      DocumentCollection documentcollection = database.getAllDocuments();
     
      // Getting the first document from the database
View Full Code Here

      ViewColumn col = cols.get(i);
      org.openntf.domino.Session openNtfSession = null;

      if (col.isConstant()) {
        if (openNtfSession == null) {
          Session sess = paramView.getParent().getParent();
          if (sess instanceof org.openntf.domino.Session) {
            openNtfSession = (org.openntf.domino.Session) sess;
          } else {
            openNtfSession = Factory.fromLotus(sess, org.openntf.domino.Session.SCHEMA, null);
          }
View Full Code Here

  private NABDb[] getSessionAddressBooks() throws NotesException {
    Map<String, Object> sc = ExtLibUtil.getSessionScope();
    NABDb[] addressBooks = sc != null ? (NABDb[]) sc.get(KEY_NABS) : null;
    if (addressBooks == null) {
      // Try with the current user
      Session session = ExtLibUtil.getCurrentSession();
      addressBooks = getSessionAddressBooks(session);
      if (addressBooks != null && addressBooks.length > 0) {
        if (sc != null) {
          sc.put(KEY_NABS, addressBooks);
        }
View Full Code Here

TOP

Related Classes of lotus.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.