Package org.openntf.domino

Examples of org.openntf.domino.Item


      if (byteArray.length > maxCDSBytes && getAutoMime() != AutoMime.WRAP_NONE) {
        // Then fall back to the normal method, which will MIMEBean it
        return this.replaceItemValueCustomData(itemName, "mime-bean", itemName, true); // TODO: What about dataTypeName?
      } else {
        beginEdit();
        Item result = fromLotus(getDelegate().replaceItemValueCustomDataBytes(itemName, dataTypeName, byteArray), Item.SCHEMA, this);
        markDirty(itemName, true);
        return result;
      }
    } catch (NotesException e) {
      DominoUtils.handleException(e, this, "Item=" + itemName);
View Full Code Here


   * @see org.openntf.domino.Document#replaceItemValue(java.lang.String, java.lang.Object)
   */
  @Override
  public Item replaceItemValue(final String itemName, final Object value, final Boolean isSummary, final boolean boxCompatibleOnly,
      final boolean returnItem) {
    Item result = null;
    try {

      try {
        result = replaceItemValueLotus(itemName, value, isSummary, returnItem);
      } catch (Exception ex2) {
View Full Code Here

  public boolean containsValue(final Object value) {
    // JG - God, I hope nobody ever actually uses this method
    // NTF - Actually I have some good use cases for it! WHEEEEEE!!
    for (String key : this.keySet()) {
      if (hasItem(key) && value instanceof CharSequence) {
        Item item = getFirstItem(key, true);
        if (item instanceof RichTextItem) {
          String text = ((RichTextItem) item).getText();
          return text.contains((CharSequence) value);
        }
      }
View Full Code Here

  @Override
  @SuppressWarnings("rawtypes")
  public boolean containsValue(final Object value, final String[] itemnames) {
    for (String key : itemnames) {
      if (hasItem(key) && value instanceof CharSequence) {
        Item item = getFirstItem(key, true);
        if (item instanceof RichTextItem) {
          String text = ((RichTextItem) item).getText();
          return text.contains((CharSequence) value);
        }
      }
View Full Code Here

    try {
      jw.startObject();
      jw.outStringProperty("@unid", getUniversalID());
      Set<String> keys = keySet();
      for (String key : keys) {
        Item currItem = getFirstItem(key);
        if (currItem.getMIMEEntity() == null) {
          jw.outProperty(key, currItem.getText());
        } else {
          String abstractedText = currItem.abstractText(0, false, false);
          if (null == abstractedText) {
            jw.outProperty(key, "**MIME ITEM, VALUE CANNOT BE DECODED TO JSON**");
          } else {
            jw.outProperty(key, abstractedText);
          }
View Full Code Here

  @Override
  public byte[] readBinary(final String name) {
    if (isChunked(name)) {
      String[] chunkNames = getChunkNames(name);
      int chunks = chunkNames.length;
      Item startChunk = getFirstItem(name);
      if (startChunk != null) {
        int chunkSize = startChunk.getValueLength();
        int resultMaxSize = chunkSize * chunks;
        byte[] accumulated = new byte[resultMaxSize];
        int actual = 0;
        int count = 0;
        for (String curChunk : chunkNames) {
View Full Code Here

   *
   * @see java.util.Iterator#next()
   */
  @Override
  public Item next() {
    Item result = null;
    if (hasNext()) {
      String name = names_[getIndex()];
      setIndex(getIndex() + 1);
      current_ = ((Document) getCollection()).getFirstItem(name);
      result = current_;
View Full Code Here

   *
   * @see org.openntf.domino.iterators.AbstractDominoListIterator#previous()
   */
  @Override
  public Item previous() {
    Item result = null;
    if (hasPrevious()) {
      int pi = previousIndex();
      String name = names_[pi];
      setIndex(pi);
      current_ = ((Document) getCollection()).getFirstItem(name);
View Full Code Here

          // Factory.wrappedEvaluate(session, entry.getKey(), source);
          if (strategy == Strategy.CREATE_AND_REPLACE) {
            target.replaceItemValue(targetItemName, sourceValue);
            // targetDirty = true;
          } else {
            Item targetItem = target.getFirstItem(targetItemName);
            if (strategy == Strategy.REPLACE_IF_NEWER) {
              DateTime itemLastMod = targetItem.getLastModified();
              if (sourceLastMod.isAfter(itemLastMod)) {
                targetItem.setValues(sourceValue);
                // targetDirty = true;
              }
            } else if (strategy == Strategy.REPLACE_ONLY) {
              if (targetItem != null) {
                targetItem.setValues(sourceValue);
                // targetDirty = true;
              }
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.openntf.domino.Item

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.