* org.apache.struts.action.ActionForm,
* javax.servlet.http.HttpServletRequest,
* javax.servlet.http.HttpServletResponse)
*/
public ActionForward modify(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
FragmentInteractionEnterOrEditForm f = (FragmentInteractionEnterOrEditForm)form;
MessageResources resources = getResources(req);
long commandEntryId = f.getCommandEntryId();
CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
if (commandEntry == null || !(commandEntry instanceof FragmentCommandEntry)){
throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore")); // may have been deleted
}
FragmentCommandEntry fragmentCommandEntry = (FragmentCommandEntry)commandEntry;
checkAccessRights(req, fragmentCommandEntry.getGroup());
commandEntryManager.evict(fragmentCommandEntry); // do not modify in this session yet (might be erroneous)
f.toEntry(fragmentCommandEntry,fragmentCommandEntry.getGroup(), locale, session, resources);
LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Command Entry with id: " + commandEntryId + " has been modified");
setCommandEntryInRequest(req, fragmentCommandEntry);
return mapping.findForward("modified");
}