Package org.silverpeas.components.projectmanager.service

## Class DefaultProjectManagerService

- java.lang.Object
- - org.silverpeas.components.projectmanager.service.DefaultProjectManagerService

- All Implemented Interfaces:
    `ProjectManagerService`

      @Service
      public class DefaultProjectManagerService
      extends Object
      implements ProjectManagerService

  CDI bean to manage the projectManager application

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultProjectManagerService()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addHolidayDate​(HolidayDetail holiday)` |
    `void` | `addHolidayDates​(List<HolidayDetail> holidayDates)` |
    `int` | `addTask​(TaskDetail task, Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)` |
    `void` | `calculateAllTasksDates​(String instanceId, int projectId, String userId)` |
    `List<TaskDetail>` | `getAllTasks​(String instanceId, Filtre filtre)` |
    `List<Date>` | `getHolidayDates​(String instanceId)` |
    `List<Date>` | `getHolidayDates​(String instanceId, Date beginDate, Date endDate)` |
    `TaskDetail` | `getMostDistantTask​(String instanceId, int taskId)` |
    `int` | `getOccupationByUser​(String userId, Date dateDeb, Date dateFin)` |
    `int` | `getOccupationByUser​(String userId, Date dateDeb, Date dateFin, int excludedTaskId)` |
    `List<TaskDetail>` | `getProjects​(String instanceId)` |
    `TaskDetail` | `getTask​(int id)` |
    `TaskDetail` | `getTaskByTodoId​(String todoId)` |
    `List<TaskDetail>` | `getTasksByMotherId​(String instanceId, int motherId)` |
    `List<TaskDetail>` | `getTasksByMotherIdAndPreviousId​(String instanceId, int motherId, int previousId)` |
    `void` | `index​(String instanceId)` |
    `boolean` | `isHolidayDate​(HolidayDetail date)` |
    `Date` | `processEndDate​(float fCharge, String instanceId, Date dateDebut)` |
    `Date` | `processEndDate​(TaskDetail task)` |
    `void` | `removeHolidayDate​(HolidayDetail holiday)` |
    `void` | `removeHolidayDates​(List<HolidayDetail> holidayDates)` |
    `void` | `removeTask​(int id, String instanceId)` |
    `void` | `updateTask​(TaskDetail task, String userId)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultProjectManagerService

          public DefaultProjectManagerService()

  - ### Method Detail

    - #### getProjects

          public List<TaskDetail> getProjects​(String instanceId)

      Specified by:
        `getProjects` in interface `ProjectManagerService`

    - #### getTasksByMotherId

          public List<TaskDetail> getTasksByMotherId​(String instanceId,
                                                     int motherId)

      Specified by:
        `getTasksByMotherId` in interface `ProjectManagerService`

    - #### getTasksByMotherIdAndPreviousId

          public List<TaskDetail> getTasksByMotherIdAndPreviousId​(String instanceId,
                                                                  int motherId,
                                                                  int previousId)

      Specified by:
        `getTasksByMotherIdAndPreviousId` in interface `ProjectManagerService`

    - #### getAllTasks

          public List<TaskDetail> getAllTasks​(String instanceId,
                                              Filtre filtre)

      Specified by:
        `getAllTasks` in interface `ProjectManagerService`

    - #### getTask

          public TaskDetail getTask​(int id)

      Specified by:
        `getTask` in interface `ProjectManagerService`

    - #### getTaskByTodoId

          public TaskDetail getTaskByTodoId​(String todoId)

      Specified by:
        `getTaskByTodoId` in interface `ProjectManagerService`

    - #### getMostDistantTask

          public TaskDetail getMostDistantTask​(String instanceId,
                                               int taskId)

      Specified by:
        `getMostDistantTask` in interface `ProjectManagerService`

    - #### addTask

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

      Specified by:
        `addTask` in interface `ProjectManagerService`

    - #### removeTask

          public void removeTask​(int id,
                                 String instanceId)

      Specified by:
        `removeTask` in interface `ProjectManagerService`

    - #### updateTask

          public void updateTask​(TaskDetail task,
                                 String userId)

      Specified by:
        `updateTask` in interface `ProjectManagerService`

    - #### processEndDate

          public Date processEndDate​(TaskDetail task)

      Specified by:
        `processEndDate` in interface `ProjectManagerService`

    - #### processEndDate

          public Date processEndDate​(float fCharge,
                                     String instanceId,
                                     Date dateDebut)

      Specified by:
        `processEndDate` in interface `ProjectManagerService`

    - #### calculateAllTasksDates

          public void calculateAllTasksDates​(String instanceId,
                                             int projectId,
                                             String userId)

      Specified by:
        `calculateAllTasksDates` in interface `ProjectManagerService`

    - #### getHolidayDates

          public List<Date> getHolidayDates​(String instanceId)

      Specified by:
        `getHolidayDates` in interface `ProjectManagerService`

    - #### getHolidayDates

          public List<Date> getHolidayDates​(String instanceId,
                                            Date beginDate,
                                            Date endDate)

      Specified by:
        `getHolidayDates` in interface `ProjectManagerService`

    - #### addHolidayDate

          public void addHolidayDate​(HolidayDetail holiday)

      Specified by:
        `addHolidayDate` in interface `ProjectManagerService`

    - #### addHolidayDates

          public void addHolidayDates​(List<HolidayDetail> holidayDates)

      Specified by:
        `addHolidayDates` in interface `ProjectManagerService`

    - #### removeHolidayDate

          public void removeHolidayDate​(HolidayDetail holiday)

      Specified by:
        `removeHolidayDate` in interface `ProjectManagerService`

    - #### removeHolidayDates

          public void removeHolidayDates​(List<HolidayDetail> holidayDates)

      Specified by:
        `removeHolidayDates` in interface `ProjectManagerService`

    - #### isHolidayDate

          public boolean isHolidayDate​(HolidayDetail date)

      Specified by:
        `isHolidayDate` in interface `ProjectManagerService`

    - #### index

          public void index​(String instanceId)

      Specified by:
        `index` in interface `ProjectManagerService`

    - #### getOccupationByUser

          public int getOccupationByUser​(String userId,
                                         Date dateDeb,
                                         Date dateFin)

      Specified by:
        `getOccupationByUser` in interface `ProjectManagerService`

    - #### getOccupationByUser

          public int getOccupationByUser​(String userId,
                                         Date dateDeb,
                                         Date dateFin,
                                         int excludedTaskId)

      Specified by:
        `getOccupationByUser` in interface `ProjectManagerService`