com.silverpeas.projectManager.control
Class ProjectManagerSessionController
java.lang.Object
com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.silverpeas.projectManager.control.ProjectManagerSessionController
- All Implemented Interfaces:
- com.stratelia.silverpeas.peasCore.ComponentSessionController
public class ProjectManagerSessionController
- extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
This class contains all the business model for project manager component
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
CHARACTER_ENCODING, context |
Constructor Summary |
ProjectManagerSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
|
Method Summary |
int |
addTask(TaskDetail task)
|
void |
addUnfoldTask(String id)
|
void |
calculateAllTasksDates()
|
void |
changeDateStatus(String date,
String nextStatus)
Change le statut de la date |
void |
changeDayOfWeekStatus(String year,
String month,
String day)
|
void |
checkBeginDate(TaskDetail task)
Vérifie la date de début d'une tâche. |
int |
checkOccupation(String userId,
Date beginDate,
Date endDate)
|
int |
checkOccupation(String taskId,
String userId)
|
int |
checkOccupation(String taskId,
String userId,
Date beginDate,
Date endDate)
|
void |
createProject(TaskDetail project)
Create a new project |
String |
date2UIDate(Date date)
|
void |
enrichirTask(TaskDetail task)
|
List<TaskDetail> |
getAllTasks()
|
List<org.silverpeas.attachment.model.SimpleDocument> |
getAttachments(String id)
|
Calendar |
getCalendar()
|
TaskDetail |
getCurrentProject()
|
Collection<TaskResourceDetail> |
getCurrentResources()
|
TaskDetail |
getCurrentTask()
|
Date |
getEndDateOfCurrentProjet()
|
Filtre |
getFiltre()
|
List<Date> |
getHolidayDates()
|
MonthVO |
getMonthVO(Date startDate)
|
Date |
getMostRelevantDate(String startDate)
Retrieve the most relevant date if the current date parameter is null. |
List<TaskDetail> |
getPotentialPreviousTasks()
|
List<TaskDetail> |
getPotentialPreviousTasks(boolean onCreation)
|
List<MonthVO> |
getQuarterMonth(Date curDate)
|
String |
getRole()
|
TaskDetail |
getTask(String id)
|
TaskDetail |
getTask(String id,
boolean getAttachments)
|
TaskDetail |
getTaskByTodoId(String todoId)
|
TaskDetail |
getTaskMere(int mereId)
|
TaskDetail |
getTaskMere(String mereId)
|
List<TaskDetail> |
getTasks()
|
List<TaskDetail> |
getTasks(String id)
|
List<TaskDetail> |
getTasksNotCancelled(String id)
Retrieve the list of tasks which are not cancelled |
List<Integer> |
getUnfoldTasks()
|
String |
getUserFullName()
|
String |
getUserFullName(com.stratelia.webactiv.beans.admin.UserDetail user)
|
List<MonthVO> |
getYearMonth(Date curDate)
|
void |
index()
|
String |
initUserPanel()
|
String |
initUserSelect()
|
boolean |
isFiltreActif()
|
boolean |
isProjectDefined()
GESTION du projet / ************************************************************************** |
Date |
processEndDate(String charge,
Date dateDebut,
String instanceId)
|
Date |
processEndDate(String taskId,
String charge,
Date dateDebut)
|
Date |
processEndDate(TaskDetail task)
|
void |
removeTask(String id)
|
void |
removeUnfoldTask(String id)
|
void |
setCurrentProject(TaskDetail currentProject)
|
void |
setCurrentResources(Collection<TaskResourceDetail> resources)
|
void |
setFiltre(Filtre filtre)
|
void |
setFiltreActif(boolean b)
|
Date |
uiDate2Date(String uiDate)
Méthodes utilitaires /
************************************************************************** |
void |
updateCurrentProject()
|
void |
updateCurrentTask()
|
void |
updateOccupation(TaskDetail task)
|
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WORKING_DAY
public static int WORKING_DAY
HOLIDAY_DAY
public static int HOLIDAY_DAY
ProjectManagerSessionController
public ProjectManagerSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
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)
getTasksNotCancelled
public List<TaskDetail> getTasksNotCancelled(String id)
- Retrieve the list of tasks which are not cancelled
- Parameters:
id
- the current root task identifier
- Returns:
- the list of tasks which are not cancelled
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)
getAttachments
public List<org.silverpeas.attachment.model.SimpleDocument> getAttachments(String id)
addTask
public int addTask(TaskDetail task)
removeTask
public void removeTask(String id)
updateCurrentTask
public void updateCurrentTask()
initUserPanel
public String initUserPanel()
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)
- 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 datenextStatus
- le nouveau statut de la date
- Throws:
ParseException
changeDayOfWeekStatus
public void changeDayOfWeekStatus(String year,
String month,
String day)
throws ParseException
- Throws:
ParseException
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(com.stratelia.webactiv.beans.admin.UserDetail user)
getUserFullName
public String getUserFullName()
getCalendar
public Calendar getCalendar()
getRole
public String getRole()
- Returns:
- String representation of highest user role
index
public void index()
setCurrentResources
public void setCurrentResources(Collection<TaskResourceDetail> resources)
getCurrentResources
public Collection<TaskResourceDetail> getCurrentResources()
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)
throws ParseException
- 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)
throws ParseException
- 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
Copyright © 2016 Silverpeas. All Rights Reserved.