Examples of transformToXmlOffset()


Examples of com.google.wave.api.data.ApiView.transformToXmlOffset()

        context.openConversation(WAVE_ID, WAVELET_ID, ALEX).getRoot();

    int insertAtApiLocation = 2;
    ApiView apiView =
        new ApiView(conversation.getRootThread().getFirstBlip().getContent(), wavelet);
    int insertAtXmlLocation = apiView.transformToXmlOffset(insertAtApiLocation);

    // Append the inline blip to the root blip
    String rootBlipId = ConversationUtil.getRootBlipId(conversation);
    OperationRequest operation = operationRequest(OperationType.DOCUMENT_INSERT_INLINE_BLIP,
        rootBlipId, Parameter.of(ParamsProperty.BLIP_DATA, blipData),
View Full Code Here

Examples of com.google.wave.api.data.ApiView.transformToXmlOffset()

      throw new InvalidRequestException(
          "Can't inline a blip on position <= 0, got " + index, operation);
    }

    ApiView view = new ApiView(parentBlip.getContent(), wavelet);
    int xmlLocation = view.transformToXmlOffset(index);

    // Insert new inline thread with the blip at the location as specified.
    ConversationBlip newBlip = parentBlip.addReplyThread(xmlLocation).appendBlip();
    context.putBlip(blipData.getBlipId(), newBlip);
View Full Code Here

Examples of com.google.wave.api.data.ApiView.transformToXmlOffset()

    if (elementApiLocation == -1) {
      throw new InvalidRequestException("Requested element not found", operation);
    }

    // Insert just after the requested element
    int xmlLocation = view.transformToXmlOffset(elementApiLocation + 1);

    // Insert new inline thread with the blip at the location of the element.
    ConversationBlip newBlip = parentBlip.addReplyThread(xmlLocation).appendBlip();
    context.putBlip(blipData.getBlipId(), newBlip);
View Full Code Here

Examples of com.google.wave.api.data.ApiView.transformToXmlOffset()

      throw new InvalidRequestException(
          "Can't inline a blip on position <= 0, got " + index, operation);
    }

    ApiView view = new ApiView(parentBlip.getContent(), wavelet);
    int xmlLocation = view.transformToXmlOffset(index);

    // Insert new inline thread with the blip at the location as specified.
    ConversationBlip newBlip = parentBlip.addReplyThread(xmlLocation).appendBlip();
    context.putBlip(blipData.getBlipId(), newBlip);
View Full Code Here

Examples of com.google.wave.api.data.ApiView.transformToXmlOffset()

    if (elementApiLocation == -1) {
      throw new InvalidRequestException("Requested element not found", operation);
    }

    // Insert just after the requested element
    int xmlLocation = view.transformToXmlOffset(elementApiLocation + 1);

    // Insert new inline thread with the blip at the location of the element.
    ConversationBlip newBlip = parentBlip.addReplyThread(xmlLocation).appendBlip();
    context.putBlip(blipData.getBlipId(), newBlip);
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.