Package evolaris.framework.smsservices.datamodel

Examples of evolaris.framework.smsservices.datamodel.IterateCommandEntry


   * @return the created or modified object
   */
  public IterateCommandEntry toEntry(IterateCommandEntry entry, Group group, Locale locale, Session session, MessageResources resources) {
    IterateInteractionEnterOrEditForm f = this;
    if (entry == null){
      entry = new IterateCommandEntry();
    }
    entry.setGroup(group);
    if (f.getSortLabel() == null ||  f.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }
View Full Code Here


  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    IterateInteractionEnterOrEditForm f = (IterateInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    IterateCommandEntry iterateCommandEntry = f.toEntry(new IterateCommandEntry(), group, locale, session, resources);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created iterate entry #" + iterateCommandEntry.getId());
    setCommandEntryInRequest(req, iterateCommandEntry);
    return mapping.findForward("created");
  }
View Full Code Here

 
 
  protected ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
    IterateInteractionEnterOrEditForm iterateForm = (IterateInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    IterateCommandEntry commandEntry = (IterateCommandEntry)commandEntryFromRequest(req);
    if(commandEntry == null){
      throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
    }
    checkAccessRights(req, commandEntry.getGroup());
    iterateForm.initialize(commandEntry, locale, session, getResources(req));
    UserSetManager userSetManager = new UserSetManager(locale,session);
    req.getSession().setAttribute("userSets", userSetManager.getUserSets(commandEntry.getGroup()));
    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("edit");
  }
View Full Code Here

    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof IterateCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }
    IterateCommandEntry iterateCommandEntry = (IterateCommandEntry)commandEntry;
    checkAccessRights(req, iterateCommandEntry.getGroup());
    commandEntryManager.evict(iterateCommandEntry)// do not modify in this session yet (might be erroneous)
    f.toEntry(iterateCommandEntry, iterateCommandEntry.getGroup(), locale, session, resources);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Command Entry with id: " + commandEntryId + " has been modified");
    setCommandEntryInRequest(req, iterateCommandEntry);
    return mapping.findForward("modified");
  }
View Full Code Here

TOP

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

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.