From 20eb7d50b1cf97cbee6fda0ac51cf7405cc0742e Mon Sep 17 00:00:00 2001 From: miciele Ghiorghis Date: Thu, 25 Apr 2013 12:59:55 +0200 Subject: [PATCH] filter-on-projectname: new methods added to read and write filter name attribute --- .../java/org/libreplan/web/common/FilterUtils.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/common/FilterUtils.java b/libreplan-webapp/src/main/java/org/libreplan/web/common/FilterUtils.java index 215958d68..c9fa8a2b1 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/common/FilterUtils.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/common/FilterUtils.java @@ -21,7 +21,6 @@ package org.libreplan.web.common; import java.util.Date; import java.util.List; -import java.util.Set; import org.joda.time.LocalDate; import org.libreplan.business.orders.entities.Order; @@ -48,6 +47,11 @@ public class FilterUtils { .getAttribute("companyFilterEndDate"); } + public static String readProjectsName() { + return (String) Sessions.getCurrent().getAttribute( + "companyFilterOrderName"); + } + public static List readProjectsParameters() { return (List) Sessions.getCurrent().getAttribute( "companyFilterLabel"); @@ -74,16 +78,20 @@ public class FilterUtils { .hasAttribute("companyFilterEndDateChanged"); } + public static void writeProjectsName(String name) { + Sessions.getCurrent().setAttribute("companyFilterOrderName", name); + } public static void writeProjectsParameters(List parameters) { Sessions.getCurrent().setAttribute("companyFilterLabel", parameters); } public static void writeProjectsFilter(Date startDate, Date endDate, - List parameters) { + List parameters, String projectName) { writeProjectsStartDate(startDate); writeProjectsEndDate(endDate); writeProjectsParameters(parameters); + writeProjectsName(projectName); } public static void writeProjectFilterChanged(boolean changed) { @@ -220,6 +228,7 @@ public class FilterUtils { .setAttribute("resourceLoadStartDateChanged", null); writeResourceLoadsEndDate(null); Sessions.getCurrent().setAttribute("resourceLoadEndDateChanged", null); + writeProjectsName(null); } public static ZoomLevel readZoomLevelCompanyView() {