Package org.apache.shindig.common.uri

Examples of org.apache.shindig.common.uri.UriBuilder.addQueryParameter()


        Map<Uri, String> snippets = Maps.newHashMap();
        if (!isAdjacent) {
          for (Uri uri : batch.getBatch()) {
            snippets.put(uri, uri.toString());
          }
          uriBuilder.addQueryParameter("SPLIT", "1");
        }
        results.add(new ConcatData(uriBuilder.toUri(), snippets));
      }
      return results;
    }
View Full Code Here


 
  private Uri makeValidationTestUri(String domain, String version) {
    UriBuilder uri = new UriBuilder();
    uri.setAuthority(domain);
    uri.setPath(IFRAME_PATH);
    uri.addQueryParameter(Param.URL.getKey(), SPEC_URI.toString());
    uri.addQueryParameter(Param.CONTAINER.getKey(), CONTAINER);
    if (version != null) {
      uri.addQueryParameter(Param.VERSION.getKey(), version);
    }
    return uri.toUri();
View Full Code Here

  private Uri makeValidationTestUri(String domain, String version) {
    UriBuilder uri = new UriBuilder();
    uri.setAuthority(domain);
    uri.setPath(IFRAME_PATH);
    uri.addQueryParameter(Param.URL.getKey(), SPEC_URI.toString());
    uri.addQueryParameter(Param.CONTAINER.getKey(), CONTAINER);
    if (version != null) {
      uri.addQueryParameter(Param.VERSION.getKey(), version);
    }
    return uri.toUri();
  }
View Full Code Here

    uri.setAuthority(domain);
    uri.setPath(IFRAME_PATH);
    uri.addQueryParameter(Param.URL.getKey(), SPEC_URI.toString());
    uri.addQueryParameter(Param.CONTAINER.getKey(), CONTAINER);
    if (version != null) {
      uri.addQueryParameter(Param.VERSION.getKey(), version);
    }
    return uri.toUri();
  }
   
  private TestDefaultIframeUriManager makeManager(boolean alwaysToken, boolean ldRequired) {
View Full Code Here

    String host = "host.com";
    String path = "/path";
    DefaultProxyUriManager manager = makeManager(host, path, null);
    UriBuilder uriBuilder = new UriBuilder();
    uriBuilder.setScheme("http").setAuthority(host).setPath(path);
    uriBuilder.addQueryParameter(Param.URL.getKey(), RESOURCE_1.toString());
    uriBuilder.addQueryParameter("synd", CONTAINER);
    uriBuilder.addQueryParameter(Param.GADGET.getKey(), SPEC_URI.toString());
    uriBuilder.addQueryParameter(Param.REFRESH.getKey(), "321");
    ProxyUriManager.ProxyUri proxyUri = manager.process(uriBuilder.toUri());
    assertEquals(RESOURCE_1, proxyUri.getResource());
View Full Code Here

    String path = "/path";
    DefaultProxyUriManager manager = makeManager(host, path, null);
    UriBuilder uriBuilder = new UriBuilder();
    uriBuilder.setScheme("http").setAuthority(host).setPath(path);
    uriBuilder.addQueryParameter(Param.URL.getKey(), RESOURCE_1.toString());
    uriBuilder.addQueryParameter("synd", CONTAINER);
    uriBuilder.addQueryParameter(Param.GADGET.getKey(), SPEC_URI.toString());
    uriBuilder.addQueryParameter(Param.REFRESH.getKey(), "321");
    ProxyUriManager.ProxyUri proxyUri = manager.process(uriBuilder.toUri());
    assertEquals(RESOURCE_1, proxyUri.getResource());
    assertEquals(CONTAINER, proxyUri.getContainer());
View Full Code Here

    DefaultProxyUriManager manager = makeManager(host, path, null);
    UriBuilder uriBuilder = new UriBuilder();
    uriBuilder.setScheme("http").setAuthority(host).setPath(path);
    uriBuilder.addQueryParameter(Param.URL.getKey(), RESOURCE_1.toString());
    uriBuilder.addQueryParameter("synd", CONTAINER);
    uriBuilder.addQueryParameter(Param.GADGET.getKey(), SPEC_URI.toString());
    uriBuilder.addQueryParameter(Param.REFRESH.getKey(), "321");
    ProxyUriManager.ProxyUri proxyUri = manager.process(uriBuilder.toUri());
    assertEquals(RESOURCE_1, proxyUri.getResource());
    assertEquals(CONTAINER, proxyUri.getContainer());
    assertEquals(SPEC_URI.toString(), proxyUri.getGadget());
View Full Code Here

    UriBuilder uriBuilder = new UriBuilder();
    uriBuilder.setScheme("http").setAuthority(host).setPath(path);
    uriBuilder.addQueryParameter(Param.URL.getKey(), RESOURCE_1.toString());
    uriBuilder.addQueryParameter("synd", CONTAINER);
    uriBuilder.addQueryParameter(Param.GADGET.getKey(), SPEC_URI.toString());
    uriBuilder.addQueryParameter(Param.REFRESH.getKey(), "321");
    ProxyUriManager.ProxyUri proxyUri = manager.process(uriBuilder.toUri());
    assertEquals(RESOURCE_1, proxyUri.getResource());
    assertEquals(CONTAINER, proxyUri.getContainer());
    assertEquals(SPEC_URI.toString(), proxyUri.getGadget());
    assertEquals(321, (int)proxyUri.getRefresh());
View Full Code Here

    state.approveToken();
    // Not part of the OAuth spec, just a handy thing for testing.
    state.setUserData(parsed.getQueryParam("user_data"));
    if (state.callbackUrl != null) {
      UriBuilder callback = UriBuilder.parse(state.callbackUrl);
      callback.addQueryParameter(OAuth.OAUTH_VERIFIER, state.verifier);
      return callback.toString();
    }
    return null;
  }
View Full Code Here

    jsPath.append(JS_SUFFIX);
    uri.setPath(jsPath.toString());

    // Standard container param, as JS may be container-specific.
    uri.addQueryParameter(Param.CONTAINER.getKey(), container);

    // Pass through nocache param for dev purposes.
    uri.addQueryParameter(Param.NO_CACHE.getKey(),
        ctx.isNoCache() ? "1" : "0");
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.