Package org.waveprotocol.wave.model.id

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


  public static BlipInstaller install(final ProfileManager profileManager,
      final ObservableSupplementedWave supplement, final ParticipantId signedInUser) {
    return new DoodadInstallers.BlipInstaller() {
      @Override
      public void install(Wavelet w, Conversation c, ConversationBlip b, Registries r) {
        WaveletName name = WaveletName.of(w.getWaveId(), w.getId());
        register(r.getElementHandlerRegistry(), name, b, supplement, profileManager,
            signedInUser.getAddress());
      }
    };
  }
View Full Code Here


      if (rawDeltas.length() != 0) {
        List<ProtocolAppliedWaveletDelta> deltas = new LinkedList<ProtocolAppliedWaveletDelta>();
        for (int i = 0; i < rawDeltas.length(); i++) {
          deltas.add(ProtocolAppliedWaveletDelta.parseFrom(Base64.decode(rawDeltas.getString(i))));
        }
        WaveletName waveletName = WaveletName.of(waveId, waveletId);
        LocalWaveletContainerImpl wavelet = (LocalWaveletContainerImpl) waveMap.getLocalWavelet(waveletName);
        Set<ParticipantId> participants = new HashSet<ParticipantId>();
        if (wavelet != null) {
          participants.addAll(wavelet.accessSnapshot().getParticipants());
        }
View Full Code Here

  @Override
  public void waveletUpdate(ReadableWaveletData wavelet, DeltaSequence deltas) {
    WaveletId waveletId = wavelet.getWaveletId();
    WaveId waveId = wavelet.getWaveId();
    WaveletName waveletName = WaveletName.of(waveId, waveletId);
    // Find whether participants were added/removed and update the views
    // accordingly.
    for (TransformedWaveletDelta delta : deltas) {
      for (WaveletOperation op : delta) {
        if (op instanceof AddParticipant) {
View Full Code Here

              Stacklet stacklet = channels.get(maybeMissing);
              if (stacklet == null) {
                Preconditions.illegalState("Resync wavelet has no stacklet. Channels: "
                    + channels.keySet() + ", resync: " + expectedWavelets.keySet());
              }
              WaveletName wavelet = WaveletName.of(waveId, maybeMissing);
              List<TransformedWaveletDelta> resyncDeltaList = createVersionZeroResync(wavelet);
              HashedVersion v0 = hashFactory.createVersionZero(wavelet);
              stacklet.onWaveletUpdate(resyncDeltaList, v0, v0);
              itr.remove();
            }
View Full Code Here

        throw new InvalidRequestException(
            address + " is not a valid participant address", operation);
      }
    }

    WaveletName waveletName = context.getConversationUtil().generateWaveletName();
    RobotWaveletData newWavelet = createEmptyRobotWavelet(participant, waveletName);
    OpBasedWavelet opBasedWavelet = newWavelet.getOpBasedWavelet(participant);

    WaveletBasedConversation.makeWaveletConversational(opBasedWavelet);
View Full Code Here

        callback.onFailure(FederationErrors.badRequest(
            "wavelet-update element missing from message: " + updateMessage));
        continue;
      }

      final WaveletName waveletName;
      try {
        waveletName = XmppUtil.waveletNameCodec.uriToWaveletName(
            waveletUpdate.attributeValue("wavelet-name"));
      } catch (EncodingException e) {
        callback.onFailure(FederationErrors.badRequest(
View Full Code Here

    ExceptionalIterator<WaveId, WaveServerException> witr = waveletProvider.getWaveIds();
    while (witr.hasNext()) {
      WaveId waveId = witr.next();
      for (WaveletId waveletId : waveletProvider.getWaveletIds(waveId)) {
        WaveletName waveletName = WaveletName.of(waveId, waveletId);

        // Required to call this method to load the wavelet into memory.
        waveletProvider.getSnapshot(waveletName);
        processWavelet(waveletName);
      }
View Full Code Here

    // wave that are visible to the user. Until this is fixed, if no wavelet is
    // specified we'll just return the conv+root.
    WaveletId waveletId = waveref.hasWaveletId() ? waveref.getWaveletId() : WaveletId.of(
        waveref.getWaveId().getDomain(), "conv+root");

    WaveletName waveletName = WaveletName.of(waveref.getWaveId(), waveletId);

    CommittedWaveletSnapshot committedSnapshot;
    try {
      if (!waveletProvider.checkAccessPermission(waveletName, requester)) {
        dest.sendError(HttpServletResponse.SC_FORBIDDEN);
View Full Code Here

    WaveId waveId = waveRef.getWaveId();
    WaveletId waveletId =
        waveRef.getWaveletId() != null ? waveRef.getWaveletId() : WaveletId.of(waveId.getDomain(),
            IdConstants.CONVERSATION_ROOT_WAVELET);

    WaveletName waveletName = WaveletName.of(waveId, waveletId);
    return waveletName;
  }
View Full Code Here

    if (attachmentId.isEmpty() || fileName.isEmpty() || waveRefStr.isEmpty()) {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
      return;
    }

    WaveletName waveletName = waveRef2WaveletName(waveRefStr);
    if (waveletName == null) {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
      return;
    }
    ParticipantId user = sessionManager.getLoggedInUser(request.getSession(false));
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.id.WaveletName

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.