public class DataApiRequestMapperUtils extends Object
Constructor and Description |
---|
DataApiRequestMapperUtils() |
Modifier and Type | Method and Description |
---|---|
static RequestMapper |
identityMapper(ResourceDictionaries resourceDictionaries)
Create a request mapper that always returns an unmodified request.
|
static RequestMapper |
validationExceptionMapper(ResourceDictionaries resourceDictionaries,
BiFunction<ApiRequest,javax.ws.rs.container.ContainerRequestContext,RequestValidationException> exceptionSource)
Create a requestMapper that always throws a validation exception based on the request.
|
public static RequestMapper identityMapper(ResourceDictionaries resourceDictionaries)
resourceDictionaries
- The dictionaries used for mapping the request.public static RequestMapper validationExceptionMapper(ResourceDictionaries resourceDictionaries, BiFunction<ApiRequest,javax.ws.rs.container.ContainerRequestContext,RequestValidationException> exceptionSource)
RoleBasedRoutingRequestMapper
where the 'default'
should only be hit exceptionally.resourceDictionaries
- The dictionaries used for mapping the request.exceptionSource
- A function to create a request validation exception.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.