Package org.waveprotocol.wave.model.waveref

Examples of org.waveprotocol.wave.model.waveref.WaveRef$Provider


      }
    }
  }

  private void createInsertAttachmentButton(ToolbarView toolbar, final ParticipantId user) {
    WaveRef waveRef = WaveRef.of(waveId);
    Preconditions.checkState(waveRef != null);
    final String waveRefToken = URL.encode(GwtWaverefEncoder.encodeToUriQueryString(waveRef));

    new ToolbarButtonViewBuilder().setIcon(css.insertAttachment()).setTooltip("Insert attachment")
        .applyTo(toolbar.addClickButton(), new ToolbarClickButton.Listener() {
View Full Code Here


  public static String linkValueFromWaveValue(String rawString) throws InvalidWaveRefException {
    if (rawString == null) {
      return null;
    }
    WaveRef ref;
    try {
      ref = WaveRef.of(WaveId.checkedDeserialise(rawString));
    } catch (InvalidIdException e) {
      // Let's try decoding it as a wave ref instead
      ref = JavaWaverefEncoder.decodeWaveRefFromPath(rawString);
View Full Code Here

        loading.removeFromParent();
      }
    });
    String encodedToken = History.getToken();
    if (encodedToken != null && !encodedToken.isEmpty()) {
      WaveRef fromWaveRef;
      try {
        fromWaveRef = GwtWaverefEncoder.decodeWaveRefFromPath(encodedToken);
      } catch (InvalidWaveRefException e) {
        LOG.info("History token contains invalid path: " + encodedToken);
        return;
      }
      if (fromWaveRef.getWaveId().equals(waveRef.getWaveId())) {
        // History change was caused by clicking on a link, it's already
        // updated by browser.
        return;
      }
    }
View Full Code Here

      public void onValueChange(ValueChangeEvent<String> event) {
        String encodedToken = event.getValue();
        if (encodedToken == null || encodedToken.length() == 0) {
          return;
        }
        WaveRef waveRef;
        try {
          waveRef = GwtWaverefEncoder.decodeWaveRefFromPath(encodedToken);
        } catch (InvalidWaveRefException e) {
          LOG.info("History token contains invalid path: " + encodedToken);
          return;
        }
        LOG.info("Changing selected wave based on history event to " + waveRef.toString());
        ClientEvents.get().fireEvent(new WaveSelectionEvent(waveRef));
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.waveref.WaveRef$Provider

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.