Package com.epimorphics.webapi
Class PageInfo
- java.lang.Object
-
- com.epimorphics.webapi.PageInfo
-
public class PageInfo extends Object
Support for interpreting paging requests on paged results lists.- Author:
- Dave Reynolds
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PAGESIZEstatic StringPAGE_PARAMprotected intpageNumberprotected intpageSizestatic StringPAGESIZE_PARAMprotected javax.ws.rs.core.UriInforequestURI
-
Constructor Summary
Constructors Constructor Description PageInfo(javax.ws.rs.core.UriInfo requestURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAbsoluteRequestURI()Return the request URI with query parameters stripped off.intgetOffset()Return the index of the first result that is requested.intgetPageNumber()Return the page number requested, default is 0.intgetPageSize()Return the page size for this request.StringgetPageURI()Return the page URI, this is the request URI with appropriate page and pagesize query parameters added.StringgetPageURI(int pn)Return the page URI for a specific numbered page.StringgetRequestRootURI()Return the request URI incluiding query parameters but not page control parameters
-
-
-
Field Detail
-
DEFAULT_PAGESIZE
public static int DEFAULT_PAGESIZE
-
PAGESIZE_PARAM
public static final String PAGESIZE_PARAM
- See Also:
- Constant Field Values
-
PAGE_PARAM
public static final String PAGE_PARAM
- See Also:
- Constant Field Values
-
requestURI
protected javax.ws.rs.core.UriInfo requestURI
-
pageSize
protected int pageSize
-
pageNumber
protected int pageNumber
-
-
Method Detail
-
getOffset
public int getOffset()
Return the index of the first result that is requested.
-
getPageNumber
public int getPageNumber()
Return the page number requested, default is 0.
-
getPageSize
public int getPageSize()
Return the page size for this request.
-
getAbsoluteRequestURI
public String getAbsoluteRequestURI()
Return the request URI with query parameters stripped off.
-
getRequestRootURI
public String getRequestRootURI()
Return the request URI incluiding query parameters but not page control parameters
-
getPageURI
public String getPageURI()
Return the page URI, this is the request URI with appropriate page and pagesize query parameters added.
-
getPageURI
public String getPageURI(int pn)
Return the page URI for a specific numbered page.
-
-