Package fr.paris.lutece.util.html
Class AbstractPaginator<E>
- java.lang.Object
-
- fr.paris.lutece.util.html.AbstractPaginator<E>
-
- Type Parameters:
E- the type
- All Implemented Interfaces:
IPaginator<E>,Serializable
- Direct Known Subclasses:
DelegatePaginator,Paginator
public abstract class AbstractPaginator<E> extends Object implements IPaginator<E>
Abstract Paginator- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringLABEL_FIRSTstatic StringLABEL_LASTstatic StringLABEL_NEXTstatic StringLABEL_PREVIOUSstatic StringPARAMETER_ITEMS_PER_PAGEDefault value for Items Per Page Parameterstatic StringPARAMETER_PAGE_INDEXDefault value for Page Index Parameter
-
Constructor Summary
Constructors Constructor Description AbstractPaginator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFirstPageLink()Returns the previous page linkintgetItemsCount()Returns the number of items in the collectionintgetItemsPerPage()Gets the items count per page.static intgetItemsPerPage(javax.servlet.http.HttpServletRequest request, String strParameter, int nCurrent, int nDefault)Gets the number of items per page from a request parameterStringgetItemsPerPageParameterName()Get the parameter name of theitems_per_pageStringgetLabelFirst()Get First labelStringgetLabelItemCount()Get Item Count labelStringgetLabelItemCountPerPage()Get Item Count per page labelStringgetLabelLast()Get First labelStringgetLabelNext()Get Next labelStringgetLabelPrevious()Get Previous labelStringgetLastPageLink()Returns the previous page linkStringgetNextPageLink()Returns the previous page linkintgetPageCurrent()Returns the current page indexstatic StringgetPageIndex(javax.servlet.http.HttpServletRequest request, String strParameter, String strCurrentPageIndex)Gets the new page index from a request parameterintgetPagesCount()Gets the number of pagesList<PaginatorPage>getPagesLinks()Returns Pages LinksStringgetPreviousPageLink()Returns the previous page linkintgetRangeMax()Returns the index of the last item of the current page rangeintgetRangeMin()Returns the index of the first item of the current page rangevoidsetItemsPerPageParameterName(String strItemsPerPageParameterName)Set the parameter name of theitems_per_page-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.paris.lutece.util.html.IPaginator
getPageItems
-
-
-
-
Field Detail
-
PARAMETER_PAGE_INDEX
public static final String PARAMETER_PAGE_INDEX
Default value for Page Index Parameter- See Also:
- Constant Field Values
-
PARAMETER_ITEMS_PER_PAGE
public static final String PARAMETER_ITEMS_PER_PAGE
Default value for Items Per Page Parameter- See Also:
- Constant Field Values
-
LABEL_FIRST
public static final String LABEL_FIRST
- See Also:
- Constant Field Values
-
LABEL_PREVIOUS
public static final String LABEL_PREVIOUS
- See Also:
- Constant Field Values
-
LABEL_NEXT
public static final String LABEL_NEXT
- See Also:
- Constant Field Values
-
LABEL_LAST
public static final String LABEL_LAST
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPageCurrent
public int getPageCurrent()
Returns the current page index- Specified by:
getPageCurrentin interfaceIPaginator<E>- Returns:
- The current page index
-
getFirstPageLink
public String getFirstPageLink()
Returns the previous page link- Specified by:
getFirstPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getPreviousPageLink
public String getPreviousPageLink()
Returns the previous page link- Specified by:
getPreviousPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getLastPageLink
public String getLastPageLink()
Returns the previous page link- Specified by:
getLastPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getItemsPerPage
public int getItemsPerPage()
Gets the items count per page.- Specified by:
getItemsPerPagein interfaceIPaginator<E>- Returns:
- items count per page.
-
getNextPageLink
public String getNextPageLink()
Returns the previous page link- Specified by:
getNextPageLinkin interfaceIPaginator<E>- Returns:
- The previous page link
-
getPagesLinks
public List<PaginatorPage> getPagesLinks()
Returns Pages Links- Specified by:
getPagesLinksin interfaceIPaginator<E>- Returns:
- Pages Links
-
getLabelFirst
public String getLabelFirst()
Get First label- Specified by:
getLabelFirstin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelPrevious
public String getLabelPrevious()
Get Previous label- Specified by:
getLabelPreviousin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelNext
public String getLabelNext()
Get Next label- Specified by:
getLabelNextin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelLast
public String getLabelLast()
Get First label- Specified by:
getLabelLastin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelItemCount
public String getLabelItemCount()
Get Item Count label- Specified by:
getLabelItemCountin interfaceIPaginator<E>- Returns:
- The Label
-
getLabelItemCountPerPage
public String getLabelItemCountPerPage()
Get Item Count per page label- Specified by:
getLabelItemCountPerPagein interfaceIPaginator<E>- Returns:
- The Label
-
getItemsPerPageParameterName
public String getItemsPerPageParameterName()
Get the parameter name of theitems_per_page- Specified by:
getItemsPerPageParameterNamein interfaceIPaginator<E>- Returns:
- the parameter name
-
setItemsPerPageParameterName
public void setItemsPerPageParameterName(String strItemsPerPageParameterName)
Set the parameter name of theitems_per_page- Specified by:
setItemsPerPageParameterNamein interfaceIPaginator<E>- Parameters:
strItemsPerPageParameterName- the parameter name
-
getPagesCount
public int getPagesCount()
Gets the number of pages- Specified by:
getPagesCountin interfaceIPaginator<E>- Returns:
- the number of pages
-
getRangeMin
public int getRangeMin()
Returns the index of the first item of the current page range- Specified by:
getRangeMinin interfaceIPaginator<E>- Returns:
- The index of the first item of the current page range
-
getRangeMax
public int getRangeMax()
Returns the index of the last item of the current page range- Specified by:
getRangeMaxin interfaceIPaginator<E>- Returns:
- The index of the last item of the current page range
-
getItemsCount
public int getItemsCount()
Returns the number of items in the collection- Specified by:
getItemsCountin interfaceIPaginator<E>- Returns:
- The number of items in the collection
-
getItemsPerPage
public static int getItemsPerPage(javax.servlet.http.HttpServletRequest request, String strParameter, int nCurrent, int nDefault)Gets the number of items per page from a request parameter- Parameters:
request- The HTTP requeststrParameter- The request parameter namenCurrent- The current number of itemsnDefault- The default number of items- Returns:
- The new number of items
-
getPageIndex
public static String getPageIndex(javax.servlet.http.HttpServletRequest request, String strParameter, String strCurrentPageIndex)
Gets the new page index from a request parameter- Parameters:
request- The HTTP requeststrParameter- The request parameter namestrCurrentPageIndex- The current page index- Returns:
- The new page index
-
-