本文整理了Java中org.jboss.resteasy.spi.HttpRequest.getDecodedFormParameters()
方法的一些代码示例,展示了HttpRequest.getDecodedFormParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.getDecodedFormParameters()
方法的具体详情如下:
包路径:org.jboss.resteasy.spi.HttpRequest
类名称:HttpRequest
方法名:getDecodedFormParameters
暂无
代码示例来源:origin: resteasy/Resteasy
@Override
public MultivaluedMap<String, String> getDecodedFormParameters()
{
return delegate.getDecodedFormParameters();
}
代码示例来源:origin: resteasy/Resteasy
public MultivaluedMap<String, String> getFormParameters()
{
return request.getDecodedFormParameters();
}
代码示例来源:origin: resteasy/Resteasy
/**
* {@inheritDoc} Wraps the request in a
*/
@Override
public CompletionStage<Object> inject(HttpRequest request, HttpResponse response, boolean unwrapAsync)
{
if (!containsPrefixedFormFieldsWithValue(request.getDecodedFormParameters()))
{
return CompletableFuture.completedFuture(null);
}
return doInject(prefix, request, response, unwrapAsync);
}
代码示例来源:origin: resteasy/Resteasy
@Override
public CompletionStage<Object> inject(HttpRequest request, HttpResponse response, boolean unwrapAsync)
{
List<String> list = request.getDecodedFormParameters().get(paramName);
if (list == null)
{
// FIXME: looks like a bug, no?
extractValues(null);
}
else if (encode)
{
List<String> encodedList = new ArrayList<String>();
for (String s : list)
{
encodedList.add(URLEncoder.encode(s));
}
list = encodedList;
}
return CompletableFuture.completedFuture(extractValues(list));
}
代码示例来源:origin: resteasy/Resteasy
@SuppressWarnings("rawtypes")
@Override
public MultivaluedMap readFrom(Class<MultivaluedMap> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException
{
LogMessages.LOGGER.debugf("Provider : %s, Method : readFrom", getClass().getName());
if (!useContainerParams) return super.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
boolean encoded = FindAnnotation.findAnnotation(annotations, Encoded.class) != null;
if (encoded) return request.getFormParameters();
else return request.getDecodedFormParameters();
}
}
代码示例来源:origin: resteasy/Resteasy
/**
* {@inheritDoc} Creates a collection instance and fills it with content by using the super implementation.
*/
@Override
public CompletionStage<Object> inject(HttpRequest request, HttpResponse response, boolean unwrapAsync)
{
T result = createInstance(collectionType);
CompletionStage<Void> ret = CompletableFuture.completedFuture(null);
for (String collectionPrefix : findMatchingPrefixesWithNoneEmptyValues(request.getDecodedFormParameters()))
{
Matcher matcher = pattern.matcher(collectionPrefix);
matcher.matches();
String key = matcher.group(1);
ret = ret.thenCompose(v -> super.doInject(collectionPrefix, request, response, unwrapAsync)
.thenAccept(value -> {
addTo(result, key, value);
}));
}
return ret.thenApply(v -> result);
}
代码示例来源:origin: resteasy/Resteasy
MultivaluedMap<String, String> map = request.getDecodedFormParameters();
if (map != null)
代码示例来源:origin: org.jboss.resteasy/resteasy-core
@Override
public MultivaluedMap<String, String> getDecodedFormParameters()
{
return delegate.getDecodedFormParameters();
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
@Override
public MultivaluedMap<String, String> getDecodedFormParameters()
{
return delegate.getDecodedFormParameters();
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
public MultivaluedMap<String, String> getFormParameters()
{
return request.getDecodedFormParameters();
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
public MultivaluedMap<String, String> getFormParameters()
{
return request.getDecodedFormParameters();
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
/**
* {@inheritDoc} Wraps the request in a
*/
@Override
public CompletionStage<Object> inject(HttpRequest request, HttpResponse response, boolean unwrapAsync)
{
if (!containsPrefixedFormFieldsWithValue(request.getDecodedFormParameters()))
{
return CompletableFuture.completedFuture(null);
}
return doInject(prefix, request, response, unwrapAsync);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
public Object inject(HttpRequest request, HttpResponse response)
{
List<String> list = request.getDecodedFormParameters().get(paramName);
if (list == null)
{
extractValues(null);
}
else if (encode)
{
List<String> encodedList = new ArrayList<String>();
for (String s : list)
{
encodedList.add(URLEncoder.encode(s));
}
list = encodedList;
}
return extractValues(list);
}
代码示例来源:origin: org.ow2.bonita/bonita-server
private void decodeFormParameters(final HttpRequest request) {
try {
decodeMultiValuedMap(request.getFormParameters());
} catch (final Throwable e) {
if (LOG.isLoggable(Level.WARNING)) {
LOG.warning("Impossible to decode some parameters using UTF-8. Keeping encoded values: " + e);
}
}
try {
decodeMultiValuedMap(request.getDecodedFormParameters());
} catch (final Throwable e) {
if (LOG.isLoggable(Level.WARNING)) {
LOG.warning("Impossible to decode some parameters using UTF-8. Keeping encoded values: " + e);
}
}
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
/**
* {@inheritDoc} Wraps the request in a
*/
@Override
public Object inject(HttpRequest request, HttpResponse response)
{
if (!containsPrefixedFormFieldsWithValue(request.getDecodedFormParameters()))
{
return null;
}
return doInject(prefix, request, response);
}
代码示例来源:origin: org.ow2.bonita/bonita-server
private void updateOptionsFormParam(final HttpRequest request, final Map<String, String> optionsMap) {
final String options = getNonEncodedStringRepresentation(optionsMap);
// form parameters
request.getFormParameters().remove(OPTIONS);
request.getFormParameters().add(OPTIONS, encodeIfNecessary(options));
// decoded form parameters
request.getDecodedFormParameters().remove(OPTIONS);
request.getDecodedFormParameters().add(OPTIONS, options);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
@SuppressWarnings("rawtypes")
@Override
public MultivaluedMap readFrom(Class<MultivaluedMap> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException
{
LogMessages.LOGGER.debugf("Provider : %s, Method : readFrom", getClass().getName());
if (!useContainerParams) return super.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
boolean encoded = FindAnnotation.findAnnotation(annotations, Encoded.class) != null;
if (encoded) return request.getFormParameters();
else return request.getDecodedFormParameters();
}
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
@Override
public MultivaluedMap readFrom(Class<MultivaluedMap> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException
{
LogMessages.LOGGER.debugf("Provider : %s, Method : readFrom", getClass().getName());
if (!useContainerParams) return super.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
boolean encoded = FindAnnotation.findAnnotation(annotations, Encoded.class) != null;
if (encoded) return request.getFormParameters();
else return request.getDecodedFormParameters();
}
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
/**
* {@inheritDoc} Creates a collection instance and fills it with content by using the super implementation.
*/
@Override
public Object inject(HttpRequest request, HttpResponse response)
{
T result = createInstance(collectionType);
for (String collectionPrefix : findMatchingPrefixesWithNoneEmptyValues(request.getDecodedFormParameters()))
{
Matcher matcher = pattern.matcher(collectionPrefix);
matcher.matches();
String key = matcher.group(1);
addTo(result, key, super.doInject(collectionPrefix, request, response));
}
return result;
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
/**
* {@inheritDoc} Creates a collection instance and fills it with content by using the super implementation.
*/
@Override
public CompletionStage<Object> inject(HttpRequest request, HttpResponse response, boolean unwrapAsync)
{
T result = createInstance(collectionType);
CompletionStage<Void> ret = CompletableFuture.completedFuture(null);
for (String collectionPrefix : findMatchingPrefixesWithNoneEmptyValues(request.getDecodedFormParameters()))
{
Matcher matcher = pattern.matcher(collectionPrefix);
matcher.matches();
String key = matcher.group(1);
ret = ret.thenCompose(v -> super.doInject(collectionPrefix, request, response, unwrapAsync)
.thenAccept(value -> {
addTo(result, key, value);
}));
}
return ret.thenApply(v -> result);
}
内容来源于网络,如有侵权,请联系作者删除!