diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java
index 003cecfeb..e8d26ecd1 100644
--- a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java
+++ b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java
@@ -29,7 +29,6 @@ import java.util.List;
import org.libreplan.business.orders.entities.Order;
import org.libreplan.web.common.Util;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@@ -50,8 +49,7 @@ import org.zkoss.zul.Window;
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class DashboardController extends GenericForwardComposer {
- @Autowired
- private DashboardModel dashboardModel;
+ private IDashboardModel dashboardModel;
private Window dashboardWindow;
diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardModel.java
index bb84daa87..4f1a66d8e 100644
--- a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardModel.java
+++ b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardModel.java
@@ -49,7 +49,7 @@ import org.springframework.stereotype.Component;
*/
@Component
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
-public class DashboardModel {
+public class DashboardModel implements IDashboardModel {
/* Parameters */
public final static int EA_STRETCHES_PERCENTAGE_STEP = 10;
diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/IDashboardModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/IDashboardModel.java
new file mode 100644
index 000000000..ce86cff33
--- /dev/null
+++ b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/IDashboardModel.java
@@ -0,0 +1,70 @@
+/*
+ * This file is part of LibrePlan
+ *
+ * Copyright (C) 2010-2011 Igalia, S.L.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package org.libreplan.web.dashboard;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import org.libreplan.business.orders.entities.Order;
+
+interface IDashboardModel {
+
+ void setCurrentOrder(Order order);
+
+ boolean tasksAvailable();
+
+ /* Progress KPI: "Number of tasks by status" */
+ BigDecimal getPercentageOfFinishedTasks();
+
+ BigDecimal getPercentageOfInProgressTasks();
+
+ BigDecimal getPercentageOfReadyToStartTasks();
+
+ BigDecimal getPercentageOfBlockedTasks();
+
+ /* Progress KPI: "Deadline violation" */
+ BigDecimal getPercentageOfOnScheduleTasks();
+
+ BigDecimal getPercentageOfTasksWithViolatedDeadline();
+
+ BigDecimal getPercentageOfTasksWithNoDeadline();
+
+ /* Progress KPI: "Global Progress of the Project" */
+ BigDecimal getAdvancePercentageByHours();
+
+ BigDecimal getTheoreticalAdvancePercentageByHoursUntilNow();
+
+ BigDecimal getCriticalPathProgressByNumHours();
+
+ BigDecimal getTheoreticalProgressByNumHoursForCriticalPathUntilNow();
+
+ BigDecimal getCriticalPathProgressByDuration();
+
+ BigDecimal getTheoreticalProgressByDurationForCriticalPathUntilNow();
+
+ /* Time KPI: "Margin with deadline" */
+ BigDecimal getMarginWithDeadLine();
+
+ /* Time KPI: "Estimation accuracy" */
+ List getFinishedTasksEstimationAccuracyHistogram();
+
+ /* Time KPI: "Lead/Lag in task completion" */
+ List getLagInTaskCompletionHistogram();
+}