public abstract class PageControlFactory extends Object
Factory to create PageControlDtos.
A PageControlDto can be used to display a Page on a web
site.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_PAGINATION_LINKS
Default value.
|
static int |
DEFAULT_PAGE_SIZE_SELECTOR_MAX_VALUE
Default value.
|
static int |
DEFAULT_PAGE_SIZE_SELECTOR_MIN_VALUE
Default value.
|
static int |
DEFAULT_PAGE_SIZE_SELECTOR_STEP
Default value.
|
static boolean |
DEFAULT_SELECT_ALL_ENTRIES_AVAILABLE
Default value.
|
protected static String |
RESOURCE_BUNDLE_BASE_NAME
The base name of the resource bundle.
|
| Constructor and Description |
|---|
PageControlFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.bremersee.comparator.ComparatorItemTransformer |
getComparatorItemTransformer()
Gets the comparator item transformer, that reads and writes the
comparator item query parameter.
|
String |
getComparatorParamName()
Gets the name of the comparator query parameter.
|
int |
getMaxPaginationLinks()
Returns the maximum numbers of pagination links.
|
int |
getMaxResultsSelectorMaxValue()
Gets the maximum value, that the page size selector can have.
|
String |
getPageNumberParamName()
Gets the name of the page number query parameter.
|
String |
getPageSizeParamName()
Gets the name of the page size query parameter.
|
int |
getPageSizeSelectorMinValue()
Gets the minimum value, that the page size selector can have.
|
int |
getPageSizeSelectorStep()
Gets the step size of the page size selector.
|
String |
getQueryParamName()
Gets the name of the query parameter.
|
boolean |
isQuerySupported()
Specifies whether a query field should be displayed on the page or not.
|
boolean |
isSelectAllEntriesAvailable()
Returns
true if the page size selector has an item to choose all
available entries, otherwise false. |
static PageControlFactory |
newInstance()
Returns a new factory instance.
|
static PageControlFactory |
newInstance(String factoryClassName)
Returns a new factory instance of the given class.
|
static PageControlFactory |
newInstance(String factoryClassName,
ClassLoader classLoader)
Returns a new factory instance of the given class.
|
<E,T> PageControlDto |
newPageControl(Page<E> page,
PageEntryTransformer<T,E> transformer,
String pageUrl,
Locale locale)
Creates a new
PageControlDto from the given page. |
abstract <E> PageControlDto |
newPageControl(Page<E> page,
String pageUrl,
Locale locale)
Creates a new
PageControlDto from the given page. |
PageControlFactory |
setComparatorItemTransformer(org.bremersee.comparator.ComparatorItemTransformer comparatorItemTransformer)
Sets the comparator item transformer, that reads and writes the
comparator item query parameter.
|
PageControlFactory |
setComparatorParamName(String comparatorParamName)
Sets the name of the comparator query parameter.
|
PageControlFactory |
setMaxPaginationLinks(int maxPaginationLinks)
Sets the maximum numbers of pagination links.
|
PageControlFactory |
setPageNumberParamName(String pageNumberParamName)
Sets the name of the page number query parameter.
|
PageControlFactory |
setPageSizeParamName(String pageSizeParamName)
Sets the name page size query parameter.
|
PageControlFactory |
setPageSizeSelectorMaxValue(int pageSizeSelectorMaxValue)
Sets the maximum value, that the page size selector can have.
|
PageControlFactory |
setPageSizeSelectorMinValue(int pageSizeSelectorMinValue)
Sets the minimum value, that the page size selector can have.
|
PageControlFactory |
setPageSizeSelectorStep(int pageSizeSelectorStep)
Sets the step size of the page size selector.
|
PageControlFactory |
setQueryParamName(String queryParamName)
Sets the name of the query parameter.
|
PageControlFactory |
setQuerySupported(boolean isQuerySupported)
Specifies whether a query field should be displayed on the page or not.
|
PageControlFactory |
setSelectAllEntriesAvailable(boolean selectAllEntriesAvailable)
Specifies whether the maximum results per page selector has an item to
choose all available entries or not.
|
protected static final String RESOURCE_BUNDLE_BASE_NAME
public static final int DEFAULT_MAX_PAGINATION_LINKS
public static final int DEFAULT_PAGE_SIZE_SELECTOR_MIN_VALUE
public static final int DEFAULT_PAGE_SIZE_SELECTOR_MAX_VALUE
public static final int DEFAULT_PAGE_SIZE_SELECTOR_STEP
public static final boolean DEFAULT_SELECT_ALL_ENTRIES_AVAILABLE
public static PageControlFactory newInstance()
public static PageControlFactory newInstance(String factoryClassName) throws InstantiationException, IllegalAccessException, ClassNotFoundException
factoryClassName - the class nameInstantiationException - if creating of the factory failsIllegalAccessException - if creating of the factory failsClassNotFoundException - if creating of the factory failspublic static PageControlFactory newInstance(String factoryClassName, ClassLoader classLoader) throws InstantiationException, IllegalAccessException, ClassNotFoundException
factoryClassName - the class nameclassLoader - the class loader to useInstantiationException - if creating of the factory failsIllegalAccessException - if creating of the factory failsClassNotFoundException - if creating of the factory failspublic org.bremersee.comparator.ComparatorItemTransformer getComparatorItemTransformer()
public PageControlFactory setComparatorItemTransformer(org.bremersee.comparator.ComparatorItemTransformer comparatorItemTransformer)
ComparatorItemTransformerImpl.comparatorItemTransformer - the comparator item transformerpublic String getQueryParamName()
public PageControlFactory setQueryParamName(String queryParamName)
queryParamName - the name of the query parameterpublic String getPageSizeParamName()
public PageControlFactory setPageSizeParamName(String pageSizeParamName)
pageSizeParamName - the name of page size query parameterpublic String getPageNumberParamName()
public PageControlFactory setPageNumberParamName(String pageNumberParamName)
pageNumberParamName - the name of the page number query parameterpublic String getComparatorParamName()
public PageControlFactory setComparatorParamName(String comparatorParamName)
comparatorParamName - the name of the comparator query parameterpublic int getPageSizeSelectorMinValue()
public PageControlFactory setPageSizeSelectorMinValue(int pageSizeSelectorMinValue)
pageSizeSelectorMinValue - the minimum valuepublic int getMaxResultsSelectorMaxValue()
public PageControlFactory setPageSizeSelectorMaxValue(int pageSizeSelectorMaxValue)
pageSizeSelectorMaxValue - the maximum valuepublic int getPageSizeSelectorStep()
public PageControlFactory setPageSizeSelectorStep(int pageSizeSelectorStep)
pageSizeSelectorStep - the step size of the page size selectorpublic boolean isSelectAllEntriesAvailable()
true if the page size selector has an item to choose all
available entries, otherwise false. Default is 'true'.public PageControlFactory setSelectAllEntriesAvailable(boolean selectAllEntriesAvailable)
selectAllEntriesAvailable - true or falsepublic int getMaxPaginationLinks()
public PageControlFactory setMaxPaginationLinks(int maxPaginationLinks)
maxPaginationLinks - the maximum numbers of pagination linkspublic boolean isQuerySupported()
true if a query field should be displayed on the page,
otherwise falsepublic PageControlFactory setQuerySupported(boolean isQuerySupported)
isQuerySupported - true if a query field should be displayed on the page,
otherwise falsepublic <E,T> PageControlDto newPageControl(Page<E> page, PageEntryTransformer<T,E> transformer, String pageUrl, Locale locale)
PageControlDto from the given page.page - the pagetransformer - the page entry transformer (may be null)pageUrl - the plain page URLlocale - the localepublic abstract <E> PageControlDto newPageControl(Page<E> page, String pageUrl, Locale locale)
PageControlDto from the given page.page - the pagepageUrl - the plain page URLlocale - the localeCopyright © 2016 bremersee.org. All rights reserved.