Class PagerImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.search.internal.models.PagerImpl
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAXIMUM_PAGE_DISPLAY_COUNT
The number of pages in results before we cut off display with ellipsis.static int
PAGINATION_RANGE_SIZE
The number of possible pages to show around current page before showing ellipsis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentPage()
Get the current page.boolean
getMorePagesAfter()
Whether there are additional pages in pagination set than are displayable currently at the end of the page list.boolean
getMorePagesBefore()
Whether there are additional pages in pagination set than are displayable currently at the start of the page list.Map<String,String>
getNextPageParameters()
Get the mext page parameters for supporting linking to the mext page.List<PagerPage>
getPages()
Get all pagination parameters available for the current result set.Map<String,String>
getPreviousPageParameters()
Get the previous page parameters for supporting linking to the previous page.int
getTotalPages()
Get the total number of pages.
-
-
-
Field Detail
-
MAXIMUM_PAGE_DISPLAY_COUNT
public static final int MAXIMUM_PAGE_DISPLAY_COUNT
The number of pages in results before we cut off display with ellipsis.- See Also:
- Constant Field Values
-
PAGINATION_RANGE_SIZE
public static final int PAGINATION_RANGE_SIZE
The number of possible pages to show around current page before showing ellipsis.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrentPage
public int getCurrentPage()
Description copied from interface:Pager
Get the current page.- Specified by:
getCurrentPage
in interfacePager
- Returns:
- the current page
-
getTotalPages
public int getTotalPages()
Description copied from interface:Pager
Get the total number of pages.- Specified by:
getTotalPages
in interfacePager
- Returns:
- the total number of pages
-
getPages
@Nonnull public List<PagerPage> getPages()
Description copied from interface:Pager
Get all pagination parameters available for the current result set.
-
getPreviousPageParameters
@Nonnull public Map<String,String> getPreviousPageParameters()
Description copied from interface:Pager
Get the previous page parameters for supporting linking to the previous page.- Specified by:
getPreviousPageParameters
in interfacePager
- Returns:
- the previous page parameters
-
getNextPageParameters
@Nonnull public Map<String,String> getNextPageParameters()
Description copied from interface:Pager
Get the mext page parameters for supporting linking to the mext page.- Specified by:
getNextPageParameters
in interfacePager
- Returns:
- the mext page parameters
-
getMorePagesBefore
public boolean getMorePagesBefore()
Description copied from interface:Pager
Whether there are additional pages in pagination set than are displayable currently at the start of the page list.- Specified by:
getMorePagesBefore
in interfacePager
- Returns:
- true if more pages before current starting page
-
getMorePagesAfter
public boolean getMorePagesAfter()
Description copied from interface:Pager
Whether there are additional pages in pagination set than are displayable currently at the end of the page list.- Specified by:
getMorePagesAfter
in interfacePager
- Returns:
- true if more pages after current end page
-
-