public class OffsetPagingStrategy extends Object implements PagingStrategy
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LIMIT_PARAM_NAME |
static String |
DEFAULT_OFFSET_PARAM_NAME |
private com.google.common.base.Optional<String> |
headerPrefix |
private PaginationInfo |
pagingInfo |
| Modifier | Constructor and Description |
|---|---|
|
OffsetPagingStrategy(PaginationInfo paginationInfo) |
private |
OffsetPagingStrategy(PaginationInfo paginationInfo,
com.google.common.base.Optional<String> headerPrefix) |
|
OffsetPagingStrategy(PaginationInfo paginationInfo,
String headerPrefix) |
| Modifier and Type | Method and Description |
|---|---|
private PagingMetadata |
createMetadata(RouteContext routeContext) |
PaginationInfo |
getPaginationInfo()
Returns the
PaginationInfo for the current request. |
private String |
getResourcePath(RouteContext routeContext) |
Object |
process(Object result,
RouteContext routeContext)
Process allows for manipulating the result of an endpoint target method invocation.
|
public static final String DEFAULT_OFFSET_PARAM_NAME
public static final String DEFAULT_LIMIT_PARAM_NAME
private final PaginationInfo pagingInfo
private final com.google.common.base.Optional<String> headerPrefix
public OffsetPagingStrategy(PaginationInfo paginationInfo)
public OffsetPagingStrategy(PaginationInfo paginationInfo, String headerPrefix)
private OffsetPagingStrategy(PaginationInfo paginationInfo, com.google.common.base.Optional<String> headerPrefix)
public Object process(Object result, RouteContext routeContext)
PagingStrategyprocess in interface PagingStrategyresult - the result returned from the target endpoint method.routeContext - the RouteContext.Object Either the unchanged result or a modified result depending on the underlying implementation.private PagingMetadata createMetadata(RouteContext routeContext)
private String getResourcePath(RouteContext routeContext)
public PaginationInfo getPaginationInfo()
PagingStrategyPaginationInfo for the current request.getPaginationInfo in interface PagingStrategyPaginationInfo for the current request.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.