* @see evolaris.platform.smssvc.web.action.InteractionEnterOrEditBaseAction#edit(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
UpcallCommandEntry commandEntry = (UpcallCommandEntry)commandEntryFromRequest(req);
if(commandEntry == null){
MessageResources resources = getResources(req);
throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
}
checkAccessRights(req, commandEntry.getGroup());
UpcallInteractionEnterOrEditForm upcallForm = (UpcallInteractionEnterOrEditForm)form;
upcallForm.setCommandEntryId(commandEntry.getId());
upcallForm.setSortLabel(commandEntry.getSortLabel());
upcallForm.setJndiName(commandEntry.getJndiName());
upcallForm.setParameter1(commandEntry.getParameter1());
upcallForm.setParameter2(commandEntry.getParameter2());
upcallForm.setParameter3(commandEntry.getParameter3());
upcallForm.setParameter4(commandEntry.getParameter4());
upcallForm.setParameter5(commandEntry.getParameter5());
req.getSession().setAttribute("enterOrEdit", "edit");
req.getSession().setAttribute("groupId", commandEntry.getGroup().getId()); // the groupId is used by the method getSortedCommandEntries
req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
TreeSet<CommandEntry> sortedCommandEntries = getSortedCommandEntries(req);
req.getSession().setAttribute("templates",sortedCommandEntries);
Long selectedTemplateId = upcallForm.getTemplateId();