Package org.javlo.helper
Class PaginationContext
- java.lang.Object
-
- org.javlo.helper.PaginationContext
-
public class PaginationContext extends Object
-
-
Constructor Summary
Constructors Constructor Description PaginationContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCountElement()
static PaginationContext
getInstance(javax.servlet.http.HttpServletRequest request, String key)
static PaginationContext
getInstance(javax.servlet.http.HttpServletRequest request, String key, int inCountElement, int elemByPage)
String
getKey()
int
getMaxPage()
int
getPage()
int
getPageSize()
boolean
isPageVisible(int itemNumber)
void
pageAction(javax.servlet.http.HttpServletRequest request)
String
renderCommand(ContentContext ctx, String url)
void
setMaxPage(int maxPage)
void
setPage(int page)
void
setPageSize(int pageSize)
String
transformURLFirstPage(String url)
String
transformURLLastPage(String url)
String
transformURLNextPage(String url)
String
transformURLPreviousPage(String url)
String
transformURLToPage(String url, int page)
-
-
-
Method Detail
-
getInstance
public static PaginationContext getInstance(javax.servlet.http.HttpServletRequest request, String key) throws ServiceException
- Throws:
ServiceException
-
getInstance
public static PaginationContext getInstance(javax.servlet.http.HttpServletRequest request, String key, int inCountElement, int elemByPage) throws ServiceException
- Throws:
ServiceException
-
pageAction
public void pageAction(javax.servlet.http.HttpServletRequest request)
-
getPage
public int getPage()
-
setPage
public void setPage(int page)
-
getMaxPage
public int getMaxPage()
-
setMaxPage
public void setMaxPage(int maxPage)
-
getPageSize
public int getPageSize()
-
setPageSize
public void setPageSize(int pageSize)
-
isPageVisible
public boolean isPageVisible(int itemNumber)
-
renderCommand
public String renderCommand(ContentContext ctx, String url) throws FileNotFoundException, IOException
- Throws:
FileNotFoundException
IOException
-
getCountElement
public int getCountElement()
-
getKey
public String getKey()
-
-