* @throws Exception
*/
public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
// get the service
StoryService storyService = AgilePlanningObjectFactory.getStoryService();
// get the form
ChargeForm chargeForm = (ChargeForm) form;
// TODO faire une seul m�thode taskService.save ?
// save the story
if (chargeForm.getPersistanceId() == 0) {
// add
storyService.addCharge(chargeForm.getStoryPersistanceId(),
chargeForm.getTaskPersistanceId(),
((User) request.getSession().getAttribute("user")).getPersistanceId(),
chargeForm.getDay(),
chargeForm.getTimeUsedToday(),
chargeForm.getDaysNeededToFinish());
} else {
// update
storyService.updateCharge(chargeForm.getDay(),
chargeForm.getTimeUsedToday(),
chargeForm.getDaysNeededToFinish(),
chargeForm.getStoryPersistanceId(),
chargeForm.getTaskPersistanceId(),
chargeForm.getPersistanceId(),