Package org.apache.shindig.common.uri

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


      uri.addQueryParameter("nocache", "1");
    } else {
      uri.addQueryParameter("v", spec.getChecksum());
    }

    uri.addQueryParameter("lang", context.getLocale().getLanguage());
    uri.addQueryParameter("country", context.getLocale().getCountry());
    uri.addQueryParameter("view", context.getView());

    UserPrefs prefs = context.getUserPrefs();
    for (UserPref pref : gadget.getSpec().getUserPrefs()) {
View Full Code Here


    } else {
      uri.addQueryParameter("v", spec.getChecksum());
    }

    uri.addQueryParameter("lang", context.getLocale().getLanguage());
    uri.addQueryParameter("country", context.getLocale().getCountry());
    uri.addQueryParameter("view", context.getView());

    UserPrefs prefs = context.getUserPrefs();
    for (UserPref pref : gadget.getSpec().getUserPrefs()) {
      String name = pref.getName();
View Full Code Here

      uri.addQueryParameter("v", spec.getChecksum());
    }

    uri.addQueryParameter("lang", context.getLocale().getLanguage());
    uri.addQueryParameter("country", context.getLocale().getCountry());
    uri.addQueryParameter("view", context.getView());

    UserPrefs prefs = context.getUserPrefs();
    for (UserPref pref : gadget.getSpec().getUserPrefs()) {
      String name = pref.getName();
      String value = prefs.getPref(name);
View Full Code Here

      String name = pref.getName();
      String value = prefs.getPref(name);
      if (value == null) {
        value = pref.getDefaultValue();
      }
      uri.addQueryParameter("up_" + pref.getName(), value);
    }
    // add url last to work around browser bugs
    if(type != View.ContentType.URL) {
      uri.addQueryParameter("url", url);
    }
View Full Code Here

      }
      uri.addQueryParameter("up_" + pref.getName(), value);
    }
    // add url last to work around browser bugs
    if(type != View.ContentType.URL) {
      uri.addQueryParameter("url", url);
    }

    return uri.toString();
  }
 
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();
  }
 
  // Used for "feature-focused" tests, eg. security token and locked domain
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

      List<ConcatData> results = Lists.newArrayListWithCapacity(batches.size());
      for (ConcatUri batch : batches) {
        UriBuilder uriBuilder = new UriBuilder(base);
        Integer i = 1;
        for (Uri uri : batch.getBatch()) {
          uriBuilder.addQueryParameter((i++).toString(), uri.toString());
        }
        Map<Uri, String> snippets = Maps.newHashMap();
        if (!isAdjacent) {
          for (Uri uri : batch.getBatch()) {
            snippets.put(uri, uri.toString());
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.