Package org.openntf.domino

Examples of org.openntf.domino.Session


  /* (non-Javadoc)
   * @see org.openntf.domino.ext.RichTextDoclink#getDatabase()
   */
  public Database getDatabase() {
    Session session = getAncestorSession();
    Database database = session.getDatabase("", "");
    database.openByReplicaID(getServerHint(), getDBReplicaID());
    return database;
  }
View Full Code Here


  public View getView() {
    String viewId = getViewUnID();
    if (viewId != null && !viewId.isEmpty()) {
      // Use session.resolve to not run afoul of same-named views
      Database database = getDatabase();
      Session session = getAncestorSession();
      String databaseUrl = database.getURL();
      String url = databaseUrl.substring(0, databaseUrl.length() - "?OpenDatabase".length()) + "/" + viewId + "?OpenView";
      return (View) session.resolve(url);

    }
    return null;
  }
View Full Code Here

   * @param parent
   */
  protected void setCurrentSession(final Session newSession) {

    // Store the first wrapped session in the sessionHolder
    Session currentSession = Factory.getSession_unchecked();
    if (currentSession == newSession) {
      // if this is the identical object, do nothing
    } else if (currentSession != null) {
      lotus.domino.Session rawSession = org.openntf.domino.impl.Base.toLotus(currentSession);
      if (org.openntf.domino.impl.Base.isDead(rawSession)) {
View Full Code Here

      return new org.openntf.domino.impl.ViewNavigator((lotus.domino.ViewNavigator) lotus, (org.openntf.domino.View) parent, this,
          cpp);
    }

    if (lotus instanceof lotus.domino.Session) {
      Session result = new org.openntf.domino.impl.Session((lotus.domino.Session) lotus, (SessionHasNoParent) parent, this, cpp);
      setCurrentSession(result);
      return result;
    }
    throw new UndefinedDelegateTypeException(lotus == null ? "null" : lotus.getClass().getName());
    //    return null;
View Full Code Here

    }
    return session_;
  }

  protected void preRun() {
    Session session = this.getNewFullAccessSession();
    setSession(session);
  }
View Full Code Here

    }
    return super.getDelegate();
  }

  void resurrect() {
    Session rawSessionUs = Factory.getSession();
    lotus.domino.Session rawSession = toLotus(rawSessionUs);
    try {
      lotus.domino.DbDirectory dir = rawSession.getDbDirectory(name_);
      dir.setHonorShowInOpenDatabaseDialog(isHonorOpenDialog_);
      setDelegate(dir, 0);
View Full Code Here

      InputStream is = DesignView.class.getResourceAsStream("/org/openntf/domino/design/impl/dxl_javascriptlibrary.xml");
      loadDxl(is);
      is.close();

      // Set some defaults
      Session session = getAncestorSession();
      String dataDirectory = session.getEnvironmentString("Directory", true);
      XMLDocument dxl = getDxl();
      dxl.selectSingleNode("/scriptlibrary/code/javaproject").setAttribute("codepath", dataDirectory);

    } catch (IOException e) {
      DominoUtils.handleException(e);
View Full Code Here

    return super.getDelegate();
  }

  public void resurrect() { // should only happen if the delegate has been destroyed somehow.
    // TODO: Currently gets session. Need to get session, sessionAsSigner or sessionAsSignerWithFullAccess, as appropriate somwhow
    Session rawSessionUs = getAncestorSession();
    if (rawSessionUs == null) {
      rawSessionUs = org.openntf.domino.utils.Factory.getSession();
    }
    lotus.domino.Session rawSession = toLotus(rawSessionUs);
    try {
View Full Code Here

    }
  }

  @Override
  public void fillExceptionDetails(final List<ExceptionDetails.Entry> result) {
    Session mySess = getParent();
    if (mySess != null)
      mySess.fillExceptionDetails(result);
    result.add(new ExceptionDetails.Entry(this, getApiPath()));
  }
View Full Code Here

      }
    }

    /* We have to ask Session - that's not cheap */
    try {
      Session sess = Factory.getSession_unchecked();
      if (sess == null) // then we can't evaluate the condition
        return false;
      if (fce._condContUserName && !publishDocMap.containsKey(LogConfig.cUserName))
        publishDocMap.put(LogConfig.cUserName, sess.getEffectiveUserName());
      if (fce._condContDBPath && !publishDocMap.containsKey(LogConfig.cDBPath))
        publishDocMap.put(LogConfig.cDBPath, sess.getCurrentDatabase().getApiPath());
    } catch (Exception e) {
      System.err.println("LogFilterHandler: Exception " + e.getClass().getName() + " in Session.getXX:");
      e.printStackTrace();
      return false;
    }
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.