當前位置: 首頁>>代碼示例>>Java>>正文


Java ContainerRequest.getQueryParameters方法代碼示例

本文整理匯總了Java中com.sun.jersey.spi.container.ContainerRequest.getQueryParameters方法的典型用法代碼示例。如果您正苦於以下問題:Java ContainerRequest.getQueryParameters方法的具體用法?Java ContainerRequest.getQueryParameters怎麽用?Java ContainerRequest.getQueryParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sun.jersey.spi.container.ContainerRequest的用法示例。


在下文中一共展示了ContainerRequest.getQueryParameters方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: filter

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
@Override
public ContainerRequest filter(ContainerRequest request) {
    // only if the query parameters contain the configured name
    // and one of the values from "fromValues"
    if (request.getQueryParameters() != null
            && !request.getQueryParameters().isEmpty()
            && request.getQueryParameters().containsKey(queryParamToModify)
            && ArrayUtils.contains(fromValues,
              request.getQueryParameters().getFirst(queryParamToModify))) {

        URI modifiedUri = getModifiedUri(request.getRequestUri());

        request.setUris(request.getBaseUri(), modifiedUri);
    }
    return request;
}
 
開發者ID:cvent,項目名稱:pangaea,代碼行數:17,代碼來源:EnvironmentModifierFilter.java

示例2: canHandle

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
@Override
public boolean canHandle(ContainerRequest request) {
    MultivaluedMap<String, String> queryParams = request.getQueryParameters();
    try {
        String sig = getSignature(request, queryParams);
        String exp = getExpiresOrDate(request, queryParams);
        String key = getAccessKey(request, queryParams);

        if (isNullOrEmpty(sig) || isNullOrEmpty(exp) || isNullOrEmpty(key)) {
            return false;
        }
        return true;
    } catch (NullPointerException ex) {
        return false;
    }
}
 
開發者ID:barnyard,項目名稱:pi,代碼行數:17,代碼來源:AWSQueryAuthenticationHandler.java

示例3: HttpRequestAdapter

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
public HttpRequestAdapter(ContainerRequest containerRequest) {
	this.containerRequest = containerRequest;
	
	MultivaluedMap<String, String> queryParams = containerRequest.getQueryParameters();
	for (Entry<String, List<String>> entry : queryParams.entrySet())
	{
		StringBuffer values = new StringBuffer();
		for (String val : entry.getValue())
		{
			if (values.length()>0) {
				values.append(",");
			}
			values.append(val);
		}
		this.queryParameters.put(entry.getKey(), values.toString());
	}
}
 
開發者ID:hburgmeier,項目名稱:jerseyoauth2,代碼行數:18,代碼來源:HttpRequestAdapter.java

示例4: getEnvParamFromRequest

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
private String getEnvParamFromRequest(ContainerRequest request) {
    if (request.getQueryParameters() != null && !request.getQueryParameters().isEmpty()
            && request.getQueryParameters().containsKey(
                    MultiEnvAware.ENVIRONMENT)) {
        return request.getQueryParameters()
                .get(MultiEnvAware.ENVIRONMENT).get(0);
    }
    
    return null;
}
 
開發者ID:cvent,項目名稱:pangaea,代碼行數:11,代碼來源:EnvironmentIdentifierFilter.java

示例5: filter

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
@Override
public ContainerRequest filter(final ContainerRequest request) {
  final MultivaluedMap<String, String> parameters = request.getQueryParameters();
  if (containsUpperCase(parameters.keySet())) {
    //rebuild URI
    final URI lower = rebuildQuery(request.getRequestUri(), parameters);
    request.setUris(request.getBaseUri(), lower);
  }
  return request;
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:11,代碼來源:ParamFilter.java

示例6: filter

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
@Override
public ContainerRequest filter(final ContainerRequest request) {
  final MultivaluedMap<String, String> parameters =
      request.getQueryParameters();
  if (containsUpperCase(parameters.keySet())) {
    //rebuild URI
    final URI lower = rebuildQuery(request.getRequestUri(), parameters);
    request.setUris(request.getBaseUri(), lower);
  }
  return request;
}
 
開發者ID:hopshadoop,項目名稱:hops,代碼行數:12,代碼來源:ParamFilter.java

示例7: addQueryParameters

import com.sun.jersey.spi.container.ContainerRequest; //導入方法依賴的package包/類
private void addQueryParameters(ContainerRequest cReq) {
	
	MultivaluedMap<String, String> params = cReq.getQueryParameters();
	for (Entry<String, List<String>> e : params.entrySet()) {
		StaashRequestContext.addContext("Q__" + e.getKey(), e.getValue().toString());
	}
}
 
開發者ID:Netflix,項目名稱:staash,代碼行數:8,代碼來源:StaashAuditFilter.java


注:本文中的com.sun.jersey.spi.container.ContainerRequest.getQueryParameters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。