commandEntry.setParseContactMsisdn(form.isParseContactMsisdn() ? 1 : 0);
}
public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
ContentParserInteractionEnterOrEditForm f = (ContentParserInteractionEnterOrEditForm)form;
ContentParseCommandEntry commandEntry = (ContentParseCommandEntry)commandEntryFromRequest(req);
if(commandEntry == null){
MessageResources resources = getResources(req);
throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
}
checkAccessRights(req, commandEntry.getGroup());
f.setCommandEntryId(commandEntry.getId());
f.setSortLabel(commandEntry.getSortLabel());
f.setCheckLength(commandEntry.getMinimumLength() != null || commandEntry.getMaximumLength() != null);
f.setMinimumLength(commandEntry.getMinimumLength() != null ? commandEntry.getMinimumLength().toString() : "");
f.setMaximumLength(commandEntry.getMaximumLength() != null ? commandEntry.getMaximumLength().toString() : "");
f.setParseCode(commandEntry.getCode() != null );
f.setCode(commandEntry.getCode() != null ? commandEntry.getCode() : "");
f.setParsePhoneProducer(commandEntry.getParsePhoneProducer() != 0);
f.setCodeNokia(commandEntry.getCodeNokia());
f.setCodeOther(commandEntry.getCodeOther());
f.setParseInteger(commandEntry.getParseInteger() != 0);
f.setOperation(commandEntry.getOperation() != null ? commandEntry.getOperation() : "");
f.setMinimumValue(commandEntry.getMinimumValue() != null ? commandEntry.getMinimumValue().toString() : "");
f.setMaximumValue(commandEntry.getMaximumValue() != null ? commandEntry.getMaximumValue().toString() : "");
f.setParseBirthDate(commandEntry.getParseBirthDate() != 0);
f.setParseUsername(commandEntry.getParseUsername() != 0);
f.setParsePassword(commandEntry.getParsePassword() != 0);
f.setParseRfidTag(commandEntry.getParseRfidTag() != 0);
f.setReassignIfNecessary(commandEntry.getParseRfidTag() == 2);
f.setParseFirstName(commandEntry.getParseFirstName() != 0);
f.setParseLastName(commandEntry.getParseLastName() != 0);
f.setParseEmailAddress(commandEntry.getParseEmailAddress() != 0);
f.setParseContactMsisdn(commandEntry.getParseContactMsisdn() != 0);
req.getSession().setAttribute("enterOrEdit", "edit");
req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
return mapping.findForward("edit");
}