Package org.openntf.domino

Examples of org.openntf.domino.Document.save()


        Map<CharSequence, Set<CharSequence>> tlValue = fullMap.get(cis);
        String term = cis.toString();
        Document termDoc = getTermDocument(term);
        String itemName = TERM_MAP_PREFIX + String.valueOf(mapKey);
        termDoc.replaceItemValue(itemName, tlValue);
        if (termDoc.save()) {
          //          System.out.println("DEBUG: Saved term doc for " + term);
        } else {
          System.out.println("DEBUG: Did not save term doc for " + term);

        }
View Full Code Here


  @Override
  public void saveNameLocationMap(final CharSequence name, final Object mapKey, final Map<CharSequence, Set<CharSequence>> map) {
    String lname = name.toString();
    Document nameDoc = getNameDocument(lname);
    nameDoc.replaceItemValue(TERM_MAP_PREFIX + String.valueOf(mapKey), map);
    nameDoc.save();
  }

  @Override
  public void saveNameLocationMap(final Object mapKey, final Map<CharSequence, Map<CharSequence, Set<CharSequence>>> fullMap,
      final DocumentScanner scanner) {
View Full Code Here

      Map<CharSequence, Set<CharSequence>> tlValue = fullMap.get(cis);
      String name = cis.toString();
      Document nameDoc = getNameDocument(name);
      String itemName = TERM_MAP_PREFIX + String.valueOf(mapKey);
      nameDoc.replaceItemValue(itemName, tlValue);
      if (nameDoc.save()) {
        //        System.out.println("Saved term doc for " + term);
      }
    }
  }
}
View Full Code Here

        if (ollr._lastWrappedDocs == null)
          olDoc.replaceItemValue("LogLastWrappedDocuments", "* Not available *");
        else
          olDoc.replaceItemValue("LogLastWrappedDocuments", ollr._lastWrappedDocs);
        olDoc.replaceItemValue("$PublicAccess", "1");
        olDoc.save(true);
      } catch (Exception e) {
        printException(e);
      }
    }

View Full Code Here

      }

      // make sure Depositor-level users can add documents too
      logDoc.appendItemValue("$PublicAccess", "1");

      logDoc.save(true);
      retval = true;
    } catch (Exception e) {
      debugPrint(e);
      retval = false;
    }
View Full Code Here

        Document doc = getDocumentWithKey(key);
        if (doc == null) {
          Map<String, Object> valueMap = value;
          doc = createDocument(valueMap);
          doc.setUniversalID(DominoUtils.toUnid(key));
          doc.save();
          return null;
        } else {
          return doc;
        }
      }
View Full Code Here

    String key = dbid.toString().toUpperCase();
    Document result = getIndexDb().getDocumentWithKey(key, true);
    if (result.isNewNote()) {
      result.replaceItemValue("Form", DB_FORM_NAME);
      result.replaceItemValue(DB_KEY_NAME, dbid);
      result.save();
    }
    return result;
  }

  public Document getTermDocument(final CharSequence token) {
View Full Code Here

    Document result = getIndexDb().getDocumentWithKey(key, true);
    if (result.isNewNote()) {
      result.replaceItemValue("Form", TERM_FORM_NAME);
      result.replaceItemValue(TERM_KEY_NAME, token);
      result.save();
    }
    return result;
  }

  public Document getNameDocument(final CharSequence name) {
View Full Code Here

    Document result = getIndexDb().getDocumentWithKey(key, true);
    if (result.isNewNote()) {
      result.replaceItemValue("Form", TERM_FORM_NAME);
      result.replaceItemValue("isName", "1");
      result.replaceItemValue(TERM_KEY_NAME, name);
      result.save();
    }
    return result;
  }

  public void scanServer(final Session session, final String serverName) {
View Full Code Here

    String dbid = db.getReplicaID();
    //    writeResults(dbid, scanner);
    dbDoc.replaceItemValue(DB_LAST_INDEX_NAME, scanDate);
    //    dbDoc.replaceItemValue(DB_FIELD_TOKEN_NAME, scanner.getFieldTokenMap());
    //    dbDoc.replaceItemValue(DB_TOKEN_LOCATION_NAME, scanner.getTokenLocationMap());
    dbDoc.save();
    return scanner;
  }

  private int totalErrCount_ = 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.