Class PaginationFilterSortManager
java.lang.Object
fr.paris.lutece.plugins.crm.business.demand.PaginationFilterSortManager
Manages pagination, filters and sort for demands
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPaginationFilterSortManager(javax.servlet.http.HttpServletRequest request) ConstructorPaginationFilterSortManager(javax.servlet.http.HttpServletRequest request, String strXpageApp) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete stored values for pagination, filter and sortvoidDelete stored values for filterfr.paris.lutece.util.html.IPaginator<Demand>createAndStorePaginator(int nIdStatus, List<Demand> listDemand, int nTotalResult) Create a paginator and store it into sessionretrieveCurrentPageIndex(int nIdStatus) Retrieve a stored current page indexRetrieve the stored demand type filterRetrieve the stored modification date filterRetrieve the stored notification filterRetrieve the stored modification date filter as stringretrieveItemsPerPage(int nIdStatus) Retrieve a stored number of items per pageretrievePaginationProperties(int nIdStatus, Integer nTotalResult) Return a bean for pagination in service/dao using parameter in http requestfr.paris.lutece.util.html.IPaginator<Demand>retrievePaginator(int nIdStatus) Retrieve a stored paginatorretrieveSort(int nIdStatus) Retrieve a stored sort from sessionvoidstoreFilterDemandType(int nIdDemandType) Store the demand type filter into sessionvoidstoreFilterModificationDate(Date modificationDate) Store the modification date filter into sessionvoidstoreFilterNotification(String strNotification) Store a notification filter into sessionvoidstoreFilterStringModificationDate(String strModificationDate) Store the modification date filter as string into sessionvoidStore a sort into session
-
Field Details
-
SESSION_PAGINATION_CURRENT_PAGE_INDEX
- See Also:
-
SESSION_PAGINATION_ITEMS_PER_PAGE
- See Also:
-
SESSION_PAGINATION_PAGINATOR
- See Also:
-
SESSION_SORT_ATTRIBUTE
- See Also:
-
SESSION_SORT_ASC
- See Also:
-
SESSION_FILTER_MODIFICATION_DATE
- See Also:
-
SESSION_FILTER_STR_MODIFICATION_DATE
- See Also:
-
SESSION_FILTER_DEMAND_TYPE
- See Also:
-
SESSION_FILTER_NOTIFICATION
- See Also:
-
-
Constructor Details
-
PaginationFilterSortManager
public PaginationFilterSortManager(javax.servlet.http.HttpServletRequest request) Constructor- Parameters:
request- the request
-
PaginationFilterSortManager
public PaginationFilterSortManager(javax.servlet.http.HttpServletRequest request, String strXpageApp) Constructor- Parameters:
request- the requeststrXpageApp- the XpageApp
-
-
Method Details
-
cleanSession
public void cleanSession()Delete stored values for pagination, filter and sort -
cleanSessionFilter
public void cleanSessionFilter()Delete stored values for filter -
storeSort
Store a sort into session- Parameters:
nIdStatus- the id statusstrSortAttribute- the sort attributebSortIsAsc- the order
-
retrieveSort
Retrieve a stored sort from session- Parameters:
nIdStatus- the id status- Returns:
- a DemandSort
-
retrieveFilterNotification
Retrieve the stored notification filter- Returns:
- the notification filter
-
storeFilterNotification
Store a notification filter into session- Parameters:
strNotification- the notification filter
-
retrieveFilterDemandType
Retrieve the stored demand type filter- Returns:
- the demand type filter
-
storeFilterDemandType
public void storeFilterDemandType(int nIdDemandType) Store the demand type filter into session- Parameters:
nIdDemandType- the demand type id
-
retrieveFilterModificationDate
Retrieve the stored modification date filter- Returns:
- the modification date filter
-
retrieveFilterStringModificationDate
Retrieve the stored modification date filter as string- Returns:
- the modification date filter as string
-
storeFilterModificationDate
Store the modification date filter into session- Parameters:
modificationDate- the modification date
-
storeFilterStringModificationDate
Store the modification date filter as string into session- Parameters:
strModificationDate- the modification date as string
-
createAndStorePaginator
public fr.paris.lutece.util.html.IPaginator<Demand> createAndStorePaginator(int nIdStatus, List<Demand> listDemand, int nTotalResult) Create a paginator and store it into session- Parameters:
nIdStatus- the id statuslistDemand- the result listnTotalResult- the total number of results- Returns:
- a paginator
-
retrievePaginator
Retrieve a stored paginator- Parameters:
nIdStatus- the id status- Returns:
- the paginator
-
retrieveCurrentPageIndex
Retrieve a stored current page index- Parameters:
nIdStatus- the id status- Returns:
- the current page index
-
retrieveItemsPerPage
Retrieve a stored number of items per page- Parameters:
nIdStatus- the id status- Returns:
- the number of items per page
-
retrievePaginationProperties
Return a bean for pagination in service/dao using parameter in http request- Parameters:
nIdStatus- the id statusnTotalResult- the total number of results- Returns:
- pagination properties
-