Class MydashboardGrusupplyUtil
java.lang.Object
fr.paris.lutece.plugins.mydashboard.modules.grusupply.util.MydashboardGrusupplyUtil
MydashboardGrusupplyUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddListCategoriesToModel(String strDashboardComponentId, String strCustomerId, String categoryCode, String strDemandTypeIds, String strListStatus, Map<String, Object> model, javax.servlet.http.HttpServletRequest request) Returns the list of categories of user demandsstatic StringgetCustomerId(String strGuid, javax.servlet.http.HttpServletRequest request) Gets customer idstatic voidgetDashboardData(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.grubusiness.business.web.rs.DemandResult demandResult, String strCustomerId, String strCategoryCode, String strSessionCurrentPageIndex, String strParameterIndexPage, Map<String, Object> model) Get dashboard datastatic List<DemandDashboard>getDemandDashboards(String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.web.rs.DemandResult demandResult) Gets the list ofDemandDashboardobjects.static StringgetFilteredStatusList(boolean bIncludeBillingStatus, boolean bIncludeAppointmentStatus) This method returns a list of statuses with or without billing statuses and appointment statuses.static StringgetListStatus(String tag, boolean includeFinalStatus, boolean includeNonFinalStatus) Get list status.static com.fasterxml.jackson.databind.ObjectMapperGet init ObjectMpperstatic voidsetModel(Map<String, Object> model, int nDefaultItemsPerPage, fr.paris.lutece.portal.web.util.LocalizedPaginator<DemandDashboard> paginator, List<fr.paris.lutece.plugins.grubusiness.business.demand.DemandType> listDemandType) Set model
-
Method Details
-
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()Get init ObjectMpper- Returns:
- objectMapper
-
getListStatus
public static String getListStatus(String tag, boolean includeFinalStatus, boolean includeNonFinalStatus) Get list status.An empty billing status list (mydashboard-grusupply.list.status.billing) displays all the generic statuses in the billing dashboards, and an empty status list never excludes any status from the other dashboards.
- Parameters:
tag-includeFinalStatus-includeNonFinalStatus-- Returns:
- list of status
-
getFilteredStatusList
public static String getFilteredStatusList(boolean bIncludeBillingStatus, boolean bIncludeAppointmentStatus) This method returns a list of statuses with or without billing statuses and appointment statuses.- Parameters:
bIncludeBillingStatus-bIncludeAppointmentStatus-- Returns:
- list of statuses separated by comma
-
getDemandDashboards
public static List<DemandDashboard> getDemandDashboards(String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.web.rs.DemandResult demandResult) Gets the list ofDemandDashboardobjects.For each demand, retrieves related notifications and enriches the data using
DemandDashboardHome.selectByDemandIds(List).- Parameters:
strCustomerId- the current customer iddemandResult- the result containing the list of demands to display- Returns:
- list of demandDashboard
-
setModel
public static void setModel(Map<String, Object> model, int nDefaultItemsPerPage, fr.paris.lutece.portal.web.util.LocalizedPaginator<DemandDashboard> paginator, List<fr.paris.lutece.plugins.grubusiness.business.demand.DemandType> listDemandType) Set model- Parameters:
model-nDefaultItemsPerPage-paginator-listDemandType-
-
addListCategoriesToModel
public static void addListCategoriesToModel(String strDashboardComponentId, String strCustomerId, String categoryCode, String strDemandTypeIds, String strListStatus, Map<String, Object> model, javax.servlet.http.HttpServletRequest request) Returns the list of categories of user demands- Parameters:
strDashboardComponentId-strCustomerId-categoryCode-strDemandTypeIds-strListStatus-request-
-
getCustomerId
Gets customer id- Parameters:
strGuid-request-- Returns:
- customer id
-
getDashboardData
public static void getDashboardData(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.plugins.grubusiness.business.web.rs.DemandResult demandResult, String strCustomerId, String strCategoryCode, String strSessionCurrentPageIndex, String strParameterIndexPage, Map<String, Object> model) Get dashboard data- Parameters:
request-demandResult-strCustomerId-strCategoryCode-model-
-