public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
InteractionLogInteractionEnterOrEditForm interactionLogForm = (InteractionLogInteractionEnterOrEditForm)form;
InteractionLogCommandEntry commandEntry = (InteractionLogCommandEntry)commandEntryFromRequest(req);
if(commandEntry == null){
MessageResources resources = getResources(req);
throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
}
checkAccessRights(req, commandEntry.getGroup());
interactionLogForm.setCommandEntryId(commandEntry.getId());
interactionLogForm.setCommandType(commandEntry.getInteractionLogCommandEntryType());
interactionLogForm.setOperation(commandEntry.getOperation());
interactionLogForm.setParameterSelection(commandEntry.getInteractionLogCommandEntryType() == 0 ? commandEntry.getParameterFromContent() : null);
interactionLogForm.setParameter(commandEntry.getParameter());
interactionLogForm.setUserSetId(commandEntry.getLogUserSet() == null ? -1 : commandEntry.getLogUserSet().getId() );
if (commandEntry.getLogCurrentUserSet() == 1) {
interactionLogForm.setUserSetId(-2);
}
interactionLogForm.setLogContact(commandEntry.getLogContact() != 0);
interactionLogForm.setSortLabel(commandEntry.getSortLabel());
req.getSession().setAttribute("enterOrEdit", "edit");
req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
req.getSession().setAttribute("userSets", new UserSetManager(locale,session).getUserSets(commandEntry.getGroup()));
return mapping.findForward("edit");
}