Package evolaris.platform.smssvc.web.form

Examples of evolaris.platform.smssvc.web.form.ContentParserInteractionEnterOrEditForm


   *      org.apache.struts.action.ActionForm,
   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    ContentParserInteractionEnterOrEditForm f = (ContentParserInteractionEnterOrEditForm)form;
    f.setSortLabel(sortLabelProposalFromSession(req));
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("enter");
  }
View Full Code Here


   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward create(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
   
    ContentParserInteractionEnterOrEditForm f = (ContentParserInteractionEnterOrEditForm)form;
   
    MessageResources resources = getResources(req);
    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
   
    ContentParseCommandEntry commandEntry = new ContentParseCommandEntry();
    Group group = groupFromSession(req);
View Full Code Here

   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward modify(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
   
    ContentParserInteractionEnterOrEditForm f = (ContentParserInteractionEnterOrEditForm)form;
   
    MessageResources resources = getResources(req);
    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
       
    long commandEntryId = f.getCommandEntryId();
    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof ContentParseCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }
View Full Code Here

    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");
  }
View Full Code Here

TOP

Related Classes of evolaris.platform.smssvc.web.form.ContentParserInteractionEnterOrEditForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.