Package evolaris.framework.smsservices.datamodel

Examples of evolaris.framework.smsservices.datamodel.SimpleCommandEntry


    MessageResources resources = getResources(req);
    if (simpleInteractionForm.getSortLabel() == null ||  simpleInteractionForm.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }

    SimpleCommandEntry commandEntry = new SimpleCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    commandEntry.setSimpleCommandEntryType(simpleInteractionForm.getCommandTypeSelection());
    commandEntry.setSortLabel(simpleInteractionForm.getSortLabel());
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created simple command entry of type: " + simpleInteractionForm.getCommandTypeSelection());
    setCommandEntryInRequest(req, commandEntry);
    return mapping.findForward("created");
  }
View Full Code Here


   */
  @Override
  protected ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    SimpleInteractionEnterOrEditForm simpleInteractionForm = (SimpleInteractionEnterOrEditForm)form;
   
    SimpleCommandEntry commandEntry = (SimpleCommandEntry)commandEntryFromRequest(req);
    if(commandEntry == null){
      MessageResources resources = getResources(req);
      throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
    }
    checkAccessRights(req, commandEntry.getGroup());
   
    simpleInteractionForm.setCommandEntryId(commandEntry.getId());
    simpleInteractionForm.setCommandTypeSelection(commandEntry.getSimpleCommandEntryType());
    simpleInteractionForm.setSortLabel(commandEntry.getSortLabel());
   
    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("edit");
  }
View Full Code Here

    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof SimpleCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }
   
    SimpleCommandEntry simpleCommandEntry = (SimpleCommandEntry)commandEntry;
    checkAccessRights(req, simpleCommandEntry.getGroup());
    commandEntryManager.evict(simpleCommandEntry)// do not modify in this session yet (might be erroneous)

    simpleCommandEntry.setSimpleCommandEntryType(simpleInteractionForm.getCommandTypeSelection());
    simpleCommandEntry.setSortLabel(simpleInteractionForm.getSortLabel());
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": simple command entry with id: " + commandEntryId + " has been modified");
    setCommandEntryInRequest(req, simpleCommandEntry);
    return mapping.findForward("modified");
  }
View Full Code Here

TOP

Related Classes of evolaris.framework.smsservices.datamodel.SimpleCommandEntry

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.