Class PaginationFilterSortManager

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

public class PaginationFilterSortManager extends Object
Manages pagination, filters and sort for demands
  • Field Details

  • 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 request
      strXpageApp - 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

      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