public class ParameterExtractor extends Object
| Modifier and Type | Field and Description |
|---|---|
private static br.com.caelum.iogi.Iogi |
IOGI |
| Constructor and Description |
|---|
ParameterExtractor() |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
addIfPresent(com.google.common.base.Optional<?> op,
String paramName,
Map<String,Object> args) |
static Map<String,Object> |
extractArguments(RouteContext routeContext,
Map<String,Consumer> consumers)
Extracts the arguments from the current request for the target route.
|
private static Object |
extractBody(RouteContext routeContext,
Parameter<?> parameter,
Map<String,Consumer> consumers) |
private static com.google.common.base.Optional<?> |
extractCookieParam(RouteContext routeContext,
RequestParameter<?> parameter) |
private static com.google.common.base.Optional<?> |
extractHeaderParam(RouteContext routeContext,
RequestParameter<?> parameter) |
static com.google.common.base.Optional<?> |
extractIogiParam(RouteContext routeContext)
Returns an instance of the type used in the parameter names using Iogi.
|
private static com.google.common.base.Optional<?> |
extractParam(RouteContext routeContext,
RequestParameter<?> parameter) |
static com.google.common.base.Optional<String> |
extractPathParam(RouteContext routeContext)
Extracts a path parameter from the passed in request path.
|
public static Map<String,Object> extractArguments(RouteContext routeContext, Map<String,Consumer> consumers)
routeContext - the RouteContext.Object[] an array of Object matching the route targets parameters.private static Object extractBody(RouteContext routeContext, Parameter<?> parameter, Map<String,Consumer> consumers)
public static com.google.common.base.Optional<String> extractPathParam(RouteContext routeContext)
routeContext - the RouteContext to extract a path parameter from.Optional<String> containing the extracted path param if present in the request path.public static com.google.common.base.Optional<?> extractIogiParam(RouteContext routeContext)
Optional may contain the instantiated instance, else isPresent will return false.private static boolean addIfPresent(com.google.common.base.Optional<?> op,
String paramName,
Map<String,Object> args)
private static com.google.common.base.Optional<?> extractHeaderParam(RouteContext routeContext, RequestParameter<?> parameter)
private static com.google.common.base.Optional<?> extractCookieParam(RouteContext routeContext, RequestParameter<?> parameter)
private static com.google.common.base.Optional<?> extractParam(RouteContext routeContext, RequestParameter<?> parameter)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.