Package org.openntf.domino

Examples of org.openntf.domino.Database


   *
   * @see org.openntf.domino.View#getDocument()
   */
  @Override
  public Document getDocument() {
    Database parent = this.getParent();
    return parent.getDocumentByUNID(this.getUniversalID());
  }
View Full Code Here


    }
    return super.getDelegate();
  }

  public void resurrect() { // should only happen if the delegate has been destroyed somehow.
    Database db = getAncestorDatabase();
    try {
      lotus.domino.Database d = toLotus(db);
      lotus.domino.View view = d.getView(name_);
      setDelegate(view, 0);
      Factory.recacheLotus(d, this, parent_);
View Full Code Here

  /* (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

   * @see org.openntf.domino.ext.RichTextDoclink#getDocument()
   */
  public org.openntf.domino.Document getDocument() {
    String documentId = getDocUnID();
    if (documentId != null && !documentId.isEmpty()) {
      Database database = getDatabase();
      return database.getDocumentByUNID(documentId);
    }
    return null;
  }
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

   * @see org.openntf.domino.Session#getCalendar(lotus.domino.Database)
   */
  @Override
  public NotesCalendar getCalendar(final lotus.domino.Database db) {
    try {
      Database parentDb = null;
      if (db instanceof Database) {
        parentDb = (Database) db;
      } else {
        parentDb = fromLotus(db, Database.SCHEMA, this);
      }
View Full Code Here

   *
   * @see org.openntf.domino.Session#getCurrentDatabase()
   */
  @Override
  public Database getCurrentDatabase() {
    Database result = null;
    try {
      if (currentDatabase_ == null) {
        result = fromLotus(getDelegate().getCurrentDatabase(), Database.SCHEMA, this);
        if (result == null)
          return null;
        String key = result.getFilePath();
        if (result.getServer().length() > 1) {
          key = result.getServer() + "!!" + result.getFilePath();
        }
        databases_.put(key, result);
        currentDatabase_ = result;
      } else {
        result = currentDatabase_;
View Full Code Here

   */
  @Override
  public Document getUserPolicySettings(final String server, final String name, final int type, final String explicitPolicy) {
    try {
      lotus.domino.Document doc = getDelegate().getUserPolicySettings(server, name, type, explicitPolicy);
      Database db = fromLotus(doc.getParentDatabase(), Database.SCHEMA, this);
      return fromLotus(doc, Document.SCHEMA, db);
    } catch (NotesException e) {
      DominoUtils.handleException(e, this);
      return null;

View Full Code Here

   */
  @Override
  public Document getUserPolicySettings(final String server, final String name, final int type) {
    try {
      lotus.domino.Document doc = getDelegate().getUserPolicySettings(server, name, type);
      Database db = fromLotus(doc.getParentDatabase(), Database.SCHEMA, this);
      return fromLotus(doc, Document.SCHEMA, db);
    } catch (NotesException e) {
      DominoUtils.handleException(e, this);
      return null;

View Full Code Here

                  }
                }
              }
            }
          } catch (Exception e) {
            Database db = doc.getAncestorDatabase();
            log_.log(Level.WARNING,
                "Unable to scan item: " + name + " in Document " + doc.getNoteID() + " in database " + db.getFilePath(), e);
          }
        }
      }

      setLastDocModDate(doc.getLastModifiedDate());
View Full Code Here

TOP

Related Classes of org.openntf.domino.Database

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.