fr.paris.lutece.plugins.crm.business.demand
Class PaginationFilterSortManager

java.lang.Object
  extended by fr.paris.lutece.plugins.crm.business.demand.PaginationFilterSortManager

public class PaginationFilterSortManager
extends Object

Manages pagination, filters and sort for demands


Field Summary
static String SESSION_FILTER_DEMAND_TYPE
           
static String SESSION_FILTER_MODIFICATION_DATE
           
static String SESSION_FILTER_NOTIFICATION
           
static String SESSION_FILTER_STR_MODIFICATION_DATE
           
static String SESSION_PAGINATION_CURRENT_PAGE_INDEX
           
static String SESSION_PAGINATION_ITEMS_PER_PAGE
           
static String SESSION_PAGINATION_PAGINATOR
           
static String SESSION_SORT_ASC
           
static String SESSION_SORT_ATTRIBUTE
           
 
Constructor Summary
PaginationFilterSortManager(javax.servlet.http.HttpServletRequest request)
          Constructor
 
Method Summary
 void cleanSession()
          Delete stored values for pagination, filter and sort
 void cleanSessionFilter()
          Delete stored values for filter
 fr.paris.lutece.util.html.IPaginator<Demand> createAndStorePaginator(int nIdStatus, List<Demand> listDemand, int nTotalResult)
          Create a paginator and store it into session
 String retrieveCurrentPageIndex(int nIdStatus)
          Retrieve a stored current page index
 Integer retrieveFilterDemandType()
          Retrieve the stored demand type filter
 Date retrieveFilterModificationDate()
          Retrieve the stored modification date filter
 String retrieveFilterNotification()
          Retrieve the stored notification filter
 String retrieveFilterStringModificationDate()
          Retrieve the stored modification date filter as string
 Integer retrieveItemsPerPage(int nIdStatus)
          Retrieve a stored number of items per page
 IPaginationProperties retrievePaginationProperties(int nIdStatus, Integer nTotalResult)
          Return a bean for pagination in service/dao using parameter in http request
 fr.paris.lutece.util.html.IPaginator<Demand> retrievePaginator(int nIdStatus)
          Retrieve a stored paginator
 DemandSort retrieveSort(int nIdStatus)
          Retrieve a stored sort from session
 void storeFilterDemandType(int nIdDemandType)
          Store the demand type filter into session
 void storeFilterModificationDate(Date modificationDate)
          Store the modification date filter into session
 void storeFilterNotification(String strNotification)
          Store a notification filter into session
 void storeFilterStringModificationDate(String strModificationDate)
          Store the modification date filter as string into session
 void storeSort(int nIdStatus, String strSortAttribute, boolean bSortIsAsc)
          Store a sort into session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_PAGINATION_CURRENT_PAGE_INDEX

public static final String SESSION_PAGINATION_CURRENT_PAGE_INDEX
See Also:
Constant Field Values

SESSION_PAGINATION_ITEMS_PER_PAGE

public static final String SESSION_PAGINATION_ITEMS_PER_PAGE
See Also:
Constant Field Values

SESSION_PAGINATION_PAGINATOR

public static final String SESSION_PAGINATION_PAGINATOR
See Also:
Constant Field Values

SESSION_SORT_ATTRIBUTE

public static final String SESSION_SORT_ATTRIBUTE
See Also:
Constant Field Values

SESSION_SORT_ASC

public static final String SESSION_SORT_ASC
See Also:
Constant Field Values

SESSION_FILTER_MODIFICATION_DATE

public static final String SESSION_FILTER_MODIFICATION_DATE
See Also:
Constant Field Values

SESSION_FILTER_STR_MODIFICATION_DATE

public static final String SESSION_FILTER_STR_MODIFICATION_DATE
See Also:
Constant Field Values

SESSION_FILTER_DEMAND_TYPE

public static final String SESSION_FILTER_DEMAND_TYPE
See Also:
Constant Field Values

SESSION_FILTER_NOTIFICATION

public static final String SESSION_FILTER_NOTIFICATION
See Also:
Constant Field Values
Constructor Detail

PaginationFilterSortManager

public PaginationFilterSortManager(javax.servlet.http.HttpServletRequest request)
Constructor

Parameters:
request - the request
Method Detail

cleanSession

public void cleanSession()
Delete stored values for pagination, filter and sort


cleanSessionFilter

public void cleanSessionFilter()
Delete stored values for filter


storeSort

public void storeSort(int nIdStatus,
                      String strSortAttribute,
                      boolean bSortIsAsc)
Store a sort into session

Parameters:
nIdStatus - the id status
strSortAttribute - the sort attribute
bSortIsAsc - the order

retrieveSort

public DemandSort retrieveSort(int nIdStatus)
Retrieve a stored sort from session

Parameters:
nIdStatus - the id status
Returns:
a DemandSort

retrieveFilterNotification

public String retrieveFilterNotification()
Retrieve the stored notification filter

Returns:
the notification filter

storeFilterNotification

public void storeFilterNotification(String strNotification)
Store a notification filter into session

Parameters:
strNotification - the notification filter

retrieveFilterDemandType

public Integer 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

public Date retrieveFilterModificationDate()
Retrieve the stored modification date filter

Returns:
the modification date filter

retrieveFilterStringModificationDate

public String retrieveFilterStringModificationDate()
Retrieve the stored modification date filter as string

Returns:
the modification date filter as string

storeFilterModificationDate

public void storeFilterModificationDate(Date modificationDate)
Store the modification date filter into session

Parameters:
modificationDate - the modification date

storeFilterStringModificationDate

public void storeFilterStringModificationDate(String strModificationDate)
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 status
listDemand - the result list
nTotalResult - the total number of results
Returns:
a paginator

retrievePaginator

public fr.paris.lutece.util.html.IPaginator<Demand> retrievePaginator(int nIdStatus)
Retrieve a stored paginator

Parameters:
nIdStatus - the id status
Returns:
the paginator

retrieveCurrentPageIndex

public String retrieveCurrentPageIndex(int nIdStatus)
Retrieve a stored current page index

Parameters:
nIdStatus - the id status
Returns:
the current page index

retrieveItemsPerPage

public Integer retrieveItemsPerPage(int nIdStatus)
Retrieve a stored number of items per page

Parameters:
nIdStatus - the id status
Returns:
the number of items per page

retrievePaginationProperties

public IPaginationProperties retrievePaginationProperties(int nIdStatus,
                                                          Integer nTotalResult)
Return a bean for pagination in service/dao using parameter in http request

Parameters:
nIdStatus - the id status
nTotalResult - the total number of results
Returns:
pagination properties


Copyright © 2013 Mairie de Paris. All Rights Reserved.