当前位置: 首页>>代码示例>>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;未经允许,请勿转载。