Class ProjectManagerSessionController

java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.components.projectmanager.control.ProjectManagerSessionController
All Implemented Interfaces:
Serializable, org.silverpeas.core.web.mvc.controller.ComponentSessionController, org.silverpeas.core.web.session.SessionCloseable

public class ProjectManagerSessionController extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
This class contains all the business model for project manager component
See Also:
  • Constructor Details

    • ProjectManagerSessionController

      public ProjectManagerSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
  • Method Details

    • getCurrentTask

      public TaskDetail getCurrentTask()
    • addUnfoldTask

      public void addUnfoldTask(String id)
    • removeUnfoldTask

      public void removeUnfoldTask(String id)
    • getUnfoldTasks

      public List<Integer> getUnfoldTasks()
    • getAllTasks

      public List<TaskDetail> getAllTasks()
    • getTasks

      public List<TaskDetail> getTasks()
    • getTasks

      public List<TaskDetail> getTasks(String id)
    • getPotentialPreviousTasks

      public List<TaskDetail> getPotentialPreviousTasks()
    • getPotentialPreviousTasks

      public List<TaskDetail> getPotentialPreviousTasks(boolean onCreation)
    • processEndDate

      public Date processEndDate(TaskDetail task)
      Parameters:
      task - la tache dont on veut calculer la date de fin
      Returns:
      la date de fin (= dateDebut + Charge)
    • processEndDate

      public Date processEndDate(String taskId, String charge, Date dateDebut)
    • processEndDate

      public Date processEndDate(String charge, Date dateDebut, String instanceId)
    • checkBeginDate

      public void checkBeginDate(TaskDetail task)
      Vérifie la date de début d'une tâche. Si la date de début est un jour non travaillé, la date de début sera le prochain jour travaillé.
      Parameters:
      task - la tâche dont la date de début doit être vérifiée
    • enrichirTask

      public void enrichirTask(TaskDetail task)
    • getTask

      public TaskDetail getTask(String id)
    • getTask

      public TaskDetail getTask(String id, boolean getAttachments)
    • getTaskByTodoId

      public TaskDetail getTaskByTodoId(String todoId)
    • getTaskMere

      public TaskDetail getTaskMere(String mereId)
    • getTaskMere

      public TaskDetail getTaskMere(int mereId)
    • addTask

      public int addTask(TaskDetail task, Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)
    • removeTask

      public void removeTask(String id)
    • updateCurrentTask

      public void updateCurrentTask()
    • initUserSelect

      public String initUserSelect()
    • isFiltreActif

      public boolean isFiltreActif()
    • setFiltreActif

      public void setFiltreActif(boolean b)
    • getFiltre

      public Filtre getFiltre()
    • setFiltre

      public void setFiltre(Filtre filtre)
    • isProjectDefined

      public boolean isProjectDefined()
    • createProject

      public void createProject(TaskDetail project, Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)
      Create a new project
      Parameters:
      project - the new TaskDetail project
    • getCurrentProject

      public TaskDetail getCurrentProject()
    • setCurrentProject

      public void setCurrentProject(TaskDetail currentProject)
    • getEndDateOfCurrentProjet

      public Date getEndDateOfCurrentProjet()
    • updateCurrentProject

      public void updateCurrentProject()
    • changeDateStatus

      public void changeDateStatus(String date, String nextStatus) throws ParseException
      Change le statut de la date
      Parameters:
      date - la date
      nextStatus - le nouveau statut de la date
      Throws:
      ParseException
    • changeDayOfWeekStatus

      public void changeDayOfWeekStatus(String year, String month, String day)
    • getHolidayDates

      public List<Date> getHolidayDates()
    • calculateAllTasksDates

      public void calculateAllTasksDates()
    • uiDate2Date

      public Date uiDate2Date(String uiDate) throws ParseException
      Throws:
      ParseException
    • date2UIDate

      public String date2UIDate(Date date)
    • getUserFullName

      public String getUserFullName(org.silverpeas.core.admin.user.model.UserDetail user)
    • getUserFullName

      public String getUserFullName()
    • getCalendar

      public Calendar getCalendar()
    • getRole

      public String getRole()
      Returns:
      String representation of highest user role
    • setCurrentResources

      public void setCurrentResources(Collection<TaskResourceDetail> resources)
    • getCurrentResources

      public Collection<TaskResourceDetail> getCurrentResources()
    • updateOccupation

      public void updateOccupation(TaskDetail task)
    • checkOccupation

      public int checkOccupation(String taskId, String userId)
    • checkOccupation

      public int checkOccupation(String taskId, String userId, Date beginDate, Date endDate)
    • checkOccupation

      public int checkOccupation(String userId, Date beginDate, Date endDate)
    • getMonthVO

      public MonthVO getMonthVO(Date startDate)
      Parameters:
      startDate - the date from which we get the current month
      Returns:
      the Month Value Object of the date's month parameter.
    • getQuarterMonth

      public List<MonthVO> getQuarterMonth(Date curDate)
      Parameters:
      curDate - If null parameter we get the current month system.
      Returns:
      a quarter which contains 3 month value object starting from start date month
    • getYearMonth

      public List<MonthVO> getYearMonth(Date curDate)
      Parameters:
      curDate - If null parameter we get the current month system.
      Returns:
      a quarter which contains 3 month value object starting from start date month
    • getMostRelevantDate

      public Date getMostRelevantDate(String startDate) throws ParseException
      Retrieve the most relevant date if the current date parameter is null.
      Parameters:
      startDate - the string representation of the date. If null we will retrieve the most relevant date in order to display current tasks
      Returns:
      the most relevant date
      Throws:
      ParseException - if the date cannot be parsed.
    • export

      public org.silverpeas.core.web.export.ExportCSVBuilder export()