aerogear-controller 1.0.1

org.jboss.aerogear.controller.router.rest.pagination
Annotation Type Paginated


@Qualifier
@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface Paginated


Optional Element Summary
 String customHeadersPrefix
          The prefix to be used when custom HTTP response headers are used to provide link to next/previous.
 int defaultLimit
          The value to be used as the default 'limit' if no query parameter by the name specified in 'limitParamName' is included in the HTTP Request.
 int defaultOffset
          The value to be used as the default 'offset' if no query parameter by the name specified in 'offsetParamName' is included in the HTTP Request.
 String limitParamName
          The name of query parameter that will be used as the 'limit' in a pagination strategy using offset/limit.
 String offsetParamName
          The name of query parameter that will be used as the 'offset' in a pagination strategy using offset/limit.
 boolean webLinking
          Determines if Web Linking should be used.
 

offsetParamName

public abstract String offsetParamName
The name of query parameter that will be used as the 'offset' in a pagination strategy using offset/limit.

Returns:
String the name of the query parameter used for the 'offset'. If not specified defaults to 'offset'.
Default:
"offset"

defaultOffset

public abstract int defaultOffset
The value to be used as the default 'offset' if no query parameter by the name specified in 'offsetParamName' is included in the HTTP Request.

Returns:
int the value to be used as the default 'offset' if no query parameter named 'offsetParamName' was included in the request.
Default:
0

limitParamName

public abstract String limitParamName
The name of query parameter that will be used as the 'limit' in a pagination strategy using offset/limit.

Returns:
String the name of the query parameter used for the 'limit'. If not specified defaults to 'limit'.
Default:
"limit"

defaultLimit

public abstract int defaultLimit
The value to be used as the default 'limit' if no query parameter by the name specified in 'limitParamName' is included in the HTTP Request.

Returns:
int the value to be used as the default 'limit' if no query parameter named 'limitParamName' was included in the request.
Default:
10

customHeadersPrefix

public abstract String customHeadersPrefix
The prefix to be used when custom HTTP response headers are used to provide link to next/previous.

For example, if you specify the prefix as 'XYZ-" the following response headers could possibly be returned:
 XYZ-Links-Next "http://server/app/resource?offset=5?limit=5"
 XYZ-Links-Previous "http://server/app/resource?offset=0?limit=5"
 
Note, that this value is only used when Web Linking is disabled (webLinking = false).

Returns:
String the prefix to be used for next/previous HTTP response headers. Defaults to 'AG-'.
Default:
"AG-"

webLinking

public abstract boolean webLinking
Determines if Web Linking should be used.

Returns:
true if Web Linking should be used, or false if custom HTTP headers should be used.
Default:
true

aerogear-controller 1.0.1

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.