Examples of WaveletId


Examples of org.waveprotocol.wave.model.id.WaveletId

    // Store the temporary id of the wavelet and rootblip so that future
    // operations can reference it.
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(waveletData.getWaveId());
      WaveletId waveletId =
          ApiIdSerializer.instance().deserialiseWaveletId(waveletData.getWaveletId());
      context.putWavelet(waveId, waveletId, newWavelet);
    } catch (InvalidIdException e) {
      throw new InvalidRequestException("Invalid id", operation, e);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    WaveId waveId = DomainConverter.convertWaveId(FROM_WAVE_ID, DOMAIN);
    assertEquals(WAVE_ID, waveId);
  }

  public void testConvertOfWaveletId() throws InvalidParticipantAddress {
    WaveletId waveletId = DomainConverter.convertWaveletId(FROM_WAVELET_ID, DOMAIN);
    assertEquals(WAVELET_ID, waveletId);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    WaveletId waveletId = DomainConverter.convertWaveletId(FROM_WAVELET_ID, DOMAIN);
    assertEquals(WAVELET_ID, waveletId);
  }

  public void testConvertOfUserdataWaveletId() throws InvalidParticipantAddress {
    WaveletId waveletId = DomainConverter.convertWaveletId(FROM_USERDATA_WAVELET_ID, DOMAIN);
    assertEquals(waveletId.getDomain(), DOMAIN);
    assertEquals(IdUtil.split(waveletId.getId())[1], USER);
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    assert container.equals(doc.getParentElement(element));
    if (!WaveletBasedSupplement.CONVERSATION_TAG.equals(doc.getTagName(element))) {
      return;
    }

    WaveletId waveletId = valueOf(element);
    if (waveletId != null) {
      WaveletThreadState existing = waveletSupplements.get(waveletId);
      if (existing == null) {
        WaveletThreadState read =
            DocumentBasedWaveletThreadState.create(router, element, waveletId, listener);
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    }
  }

  public void onElementRemoved(E element) {
    if (WaveletBasedSupplement.CONVERSATION_TAG.equals(getDocument().getTagName(element))) {
      WaveletId waveletId = valueOf(element);
      if (waveletId != null) {
        WaveletThreadState state = waveletSupplements.remove(waveletId);
        if (state == null) {
          // Not good - there was a collapsed-state element and we weren't
          // tracking it...
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

      case CONNECTED:
        if (update.hasChannelId()) {
          logger.trace().log("A non-first update contained a channel id: " + update);
        }
        if (openListener != null) {
          WaveletId waveletId = update.hasWaveletId() ? update.getWaveletId() : null;
          HashedVersion lastCommittedVersion = update.hasLastCommittedVersion() ?
              update.getLastCommittedVersion() : null;
          HashedVersion currentVersion = update.hasCurrentVersion() ?
              update.getCurrentVersion() : null;
          try {
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

  public OpBasedWavelet openWavelet(OperationRequest operation, ParticipantId participant)
      throws InvalidRequestException {
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
      WaveletId waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVELET_ID));
      return openWavelet(waveId, waveletId, participant);
    } catch (InvalidIdException e) {
      throw new InvalidRequestException("Invalid id", operation, e);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

  public ObservableConversationView openConversation(
      OperationRequest operation, ParticipantId participant) throws InvalidRequestException {
    try {
      WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
      WaveletId waveletId = ApiIdSerializer.instance().deserialiseWaveletId(
          OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVELET_ID));
      return openConversation(waveId, waveletId, participant);
    } catch (InvalidIdException e) {
      throw new InvalidRequestException("Invalid id", operation, e);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

  @Override
  public void execute(final OperationRequest operation, final OperationContext context, ParticipantId participant)
      throws InvalidRequestException {
    WaveId waveId;
    WaveletId waveletId;
    HashedVersion startVersion;
    HashedVersion endVersion;
    try {
      waveId = ApiIdSerializer.instance().deserialiseWaveId(
        OperationUtil.<String>getRequiredParameter(operation, ParamsProperty.WAVE_ID));
View Full Code Here

Examples of org.waveprotocol.wave.model.id.WaveletId

    OpBasedWavelet wavelet = context.openWavelet(operation, participant);
    ConversationView conversationView = context.getConversationUtil().buildConversation(wavelet);

    // TODO (Yuri Z.) Find a way to obtain an instance of IdGenerator and use it
    // to create udwId.
    WaveletId udwId = IdUtil.buildUserDataWaveletId(participant);
    String waveIdStr = OperationUtil.getRequiredParameter(operation, ParamsProperty.WAVE_ID);
    WaveId waveId = null;
    try {
      waveId = ApiIdSerializer.instance().deserialiseWaveId(waveIdStr);
    } catch (InvalidIdException e) {
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.