Package evolaris.framework.smsservices.business

Examples of evolaris.framework.smsservices.business.CommandEntryManager


      users.add(emailCommandEntry.getDestinationUser());
    }
    SortedSet<EmailAddress> userAddresses = EmailAddress.availableAddresses(users);
    prepareUser(req, emailInteractionEnterOrEditForm, userAddresses);
   
    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    Set<EmailCommandEntry> commandEntries = commandEntryManager.getTemplateCommandEntries(group, new EmailCommandEntry());
    req.getSession().setAttribute("templates",commandEntries);

    req.getSession().setAttribute("interactionGroupName",group.getGroupname());
    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
View Full Code Here


   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward modify(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    EmailInteractionEnterOrEditForm f = (EmailInteractionEnterOrEditForm) form;
    long commandEntryId = f.getCommandEntryId();
    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof EmailCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }
    EmailCommandEntry emailCommandEntry = (EmailCommandEntry)commandEntry;
    Group group = emailCommandEntry.getGroup();
    checkAccessRights(req, group);
    commandEntryManager.evict(emailCommandEntry)// do not modify in this session yet (might be erroneous)
    f.toEntry(emailCommandEntry, locale, session, getResources(req));
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase()
        + ": Modified message command entry #" + emailCommandEntry.getId()
        + "; label: " + emailCommandEntry.getSortLabel() + "; subject: " + emailCommandEntry.getSubject());
    setCommandEntryInRequest(req, emailCommandEntry);
View Full Code Here

   * @param sendForm
   */
  @SuppressWarnings("unchecked")
  private void prepareTemplate(HttpServletRequest req, EmailInteractionEnterOrEditForm sendForm) {

    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    Set<EmailCommandEntry> commandEntries = commandEntryManager.getTemplateCommandEntries(groupFromSession(req), new EmailCommandEntry());
    req.getSession().setAttribute("templates",commandEntries);

    Long selectedTemplateId = sendForm.getTemplateId();
    sendForm.setTemplateId(-1L)// none selected
    if (selectedTemplateId != null && selectedTemplateId != -1){
View Full Code Here

   
    Long selectedTemplateId = Long.parseLong(req.getParameter("id"));
   
    if (selectedTemplateId != null && selectedTemplateId != -1){
      EmailInteractionEnterOrEditForm f = new EmailInteractionEnterOrEditForm();
      CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
      EmailCommandEntry templateEntry = (EmailCommandEntry)commandEntryManager.getCommandEntry(selectedTemplateId);
      f.initializeFromTemplate(templateEntry);
     
      JSONObject jsonObject = JSONObject.fromObject(f);
      writeJsonResult(jsonObject.toString(), resp);
    }
View Full Code Here

TOP

Related Classes of evolaris.framework.smsservices.business.CommandEntryManager

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.