Class 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:
    Serialized Form
    • Constructor Detail

      • ProjectManagerSessionController

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

      • getCurrentTask

        public TaskDetail getCurrentTask()
      • addUnfoldTask

        public void addUnfoldTask​(String id)
      • removeUnfoldTask

        public void removeUnfoldTask​(String id)
      • getUnfoldTasks

        public List<Integer> getUnfoldTasks()
      • 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 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)
      • 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)
        Parameters:
        b -
      • getFiltre

        public Filtre getFiltre()
        Returns:
      • setFiltre

        public void setFiltre​(Filtre filtre)
        Parameters:
        filtre -
      • isProjectDefined

        public boolean isProjectDefined()
        GESTION du projet / **************************************************************************
      • 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()
        Returns:
      • 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
        Méthodes utilitaires / **************************************************************************
        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
      • updateOccupation

        public void updateOccupation​(TaskDetail task)
        Parameters:
        task -
      • checkOccupation

        public int checkOccupation​(String taskId,
                                   String userId)
        Parameters:
        taskId -
        userId -
        Returns:
      • checkOccupation

        public int checkOccupation​(String taskId,
                                   String userId,
                                   Date beginDate,
                                   Date endDate)
        Parameters:
        taskId -
        userId -
        beginDate -
        endDate -
        Returns:
      • checkOccupation

        public int checkOccupation​(String userId,
                                   Date beginDate,
                                   Date endDate)
        Parameters:
        userId -
        beginDate -
        endDate -
        Returns:
      • 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
        Throws:
        ParseException
      • 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
        Throws:
        ParseException
      • 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
      • export

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