Package evolaris.framework.async.business.communication

Examples of evolaris.framework.async.business.communication.MessagingManager


          return mapping.findForward("confirm");
        } else {
          SmsDestinationAddress receiver = new SmsDestinationAddress(msisdn);
          SortedSet<SmsDestinationAddress> receivers = new TreeSet<SmsDestinationAddress>();
          receivers.add(receiver);
          MessagingManager msgMgr = new MessagingManager(locale, session);
          msgMgr.sendSms(fromAddress, receivers, getCurrentGroup(req), smsSendForm.getMessage(), sendAt);
          Date date = new Date();
          String formattedDate = DateFormat.getTimeInstance(DateFormat.MEDIUM,locale).format(date);
          String generalInformation = getResources(req).getMessage(locale, "smssvc.asyncSendStarted", new Object[] {new Integer(receivers.size()), formattedDate});
          req.setAttribute("generalInformation", generalInformation);
          return mapping.findForward("sent");
View Full Code Here


      String noUsersWithMsisdnsString = getResources(req).getMessage(locale,"smssvc.noUsersWithMsisdns");
      req.setAttribute("generalError",noUsersWithMsisdnsString);
      return mapping.findForward("notSent");
    }

    MessagingManager msgMgr = new MessagingManager(locale, session);
    msgMgr.sendSms(fromAddress, receivers, getCurrentGroup(req), msgForm.getMessage(), sendAt);
    Date date = new Date();
    String formattedDate = DateFormat.getTimeInstance(DateFormat.MEDIUM,locale).format(date);
    String generalInformation = getResources(req).getMessage(locale, "smssvc.asyncSendStarted", new Object[] {new Integer(receivers.size()), formattedDate});
    req.setAttribute("generalInformation", generalInformation);
    return mapping.findForward("sent");
View Full Code Here

      break;
    case 3// e-mail address
      EmailAddress toAddress = new EmailAddress(emailSendForm.getToEmail(), emailSendForm.getToPersonalName());
      SortedSet<EmailAddress> receivers = new TreeSet<EmailAddress>();
      receivers.add(toAddress);
      MessagingManager msgMgr = new MessagingManager(locale, session);
      msgMgr.sendEmail(fromAddress, receivers, getCurrentGroup(req), emailSendForm.getSubject(), emailSendForm.getMessage(), emailSendForm.getMimeType() == null ? MailSender.MIME_TYPE_PLAIN_TEXT : emailSendForm.getMimeType().intValue(), sendAt);
      Date date = new Date(System.currentTimeMillis());
      String formattedDate = DateFormat.getTimeInstance(DateFormat.MEDIUM,locale).format(date);
      String generalInformation = getResources(req).getMessage(locale, "smssvc.asyncSendStarted", new Object[] {new Integer(receivers.size()), formattedDate});
      req.setAttribute("generalInformation", generalInformation);
      return mapping.findForward("sent");
View Full Code Here

    if (receivers.size() == 0) {
      String noUsersWithEmailString = getResources(req).getMessage(locale,"smssvc.noUsersWithEmail");
      req.setAttribute("generalError",noUsersWithEmailString);
      return mapping.findForward("notSent");
    }
    MessagingManager msgMgr = new MessagingManager(locale, session);
    msgMgr.sendEmail(fromAddress, receivers, getCurrentGroup(req), msgForm.getSubject(), msgForm.getMessage(), msgForm.getMimeType() == null ? MailSender.MIME_TYPE_PLAIN_TEXT : msgForm.getMimeType().intValue(), sendAt);
    Date date = new Date(System.currentTimeMillis());
    String formattedDate = DateFormat.getTimeInstance(DateFormat.MEDIUM,locale).format(date);
    String generalInformation = getResources(req).getMessage(locale, "smssvc.asyncSendStarted", new Object[] {new Integer(receivers.size()), formattedDate});
    req.setAttribute("generalInformation", generalInformation);
    return mapping.findForward("sent");
View Full Code Here

TOP

Related Classes of evolaris.framework.async.business.communication.MessagingManager

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.