Examples of Recipient


Examples of com.adito.notification.Recipient

                    throws Exception {
        MessageForm mf = (MessageForm)form;
        Realm realm = getSessionInfo(request).getUser().getRealm();
        Message msg = new Message(mf.getSubject(), mf.getContent(), mf.getUrgent());
        for(Iterator i = mf.getSelectedAccountsList().iterator(); i.hasNext(); ) {
            msg.getRecipients().add(new Recipient(Recipient.USER, (String)i.next(), realm.getResourceName()));
        }
        for(Iterator i = mf.getSelectedRolesList().iterator(); i.hasNext(); ) {
            msg.getRecipients().add(new Recipient(Recipient.ROLE, (String)i.next(), realm.getResourceName()));
        }
        for(Iterator i = mf.getSelectedPoliciesList().iterator(); i.hasNext(); ) {
            String policyName = PolicyDatabaseFactory.getInstance().getPolicy(Integer.parseInt((String)i.next())).getResourceName();
            msg.getRecipients().add(new Recipient(Recipient.POLICY, policyName, realm.getResourceName()));
        }
        if(msg.getRecipients().size() == 0) {
            throw new Exception("No recipients in any of the accounts, roles or policies selected.");
        }
        if(mf.getSelectedSink().equals("*")) {
View Full Code Here

Examples of com.blazebit.mail.Recipient

    }
  }

  private void setReplyTo(Mail email, Message message)
      throws UnsupportedEncodingException, MessagingException {
    Recipient replyToRecipient = email.getReplyTo();

    if (replyToRecipient != null) {
      InternetAddress replyToAddress = new InternetAddress(
          replyToRecipient.getAddress(), replyToRecipient.getName());
      message.setReplyTo(new Address[] { replyToAddress });
    }
  }
View Full Code Here

Examples of com.dotmarketing.portlets.campaigns.model.Recipient

    List<HashMap<String, Object>> campaigns = new ArrayList<HashMap<String, Object>>();
   
    List communications = new ArrayList();

    Iterator itRecipient = recipients.iterator();
    Recipient r;
    while(itRecipient.hasNext()){
      r = (Recipient) itRecipient.next();
      Campaign campaign = (Campaign) InodeFactory.getParentOfClass(r, Campaign.class);
      if (InodeUtils.isSet(campaign.getInode())) {
        if (UtilMethods.isSet(campaign.getExpirationDate()) && now.after(campaign.getExpirationDate())) {
View Full Code Here

Examples of com.stripe.model.Recipient

    return params;
  }

  static Map<String, Object> getTransferParams() throws StripeException {
    Map<String, Object> params = new HashMap<String, Object>();
      Recipient recipient = Recipient.create(defaultRecipientParams);
      params.put("amount", 100);
      params.put("currency", "usd");
      params.put("recipient", recipient.getId());
      params.put("card", recipient.getDefaultCard());
    return params;
  }
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

        SendRequest request = parser.readSendRequest(in);

        assertEquals(1, request.getRecipients().length);

        Recipient recipient = request.getRecipients()[0];
        assertEquals("alice@volantis.com", recipient.getAddress().getValue());
        assertEquals("smtp", recipient.getChannel());
        assertEquals("Nokia-6600", recipient.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, recipient.getRecipientType());

        assertEquals("Hello", request.getMessage().getSubject());
        assertEquals(new URL("http://localhost:8080/volantis/welcome/welcome.xdime"),
                request.getMessage().getURL());
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

    public void testSendRequestBasicSerialization() throws Exception {

        MessageFactory factory = MessageFactory.getDefaultInstance();

        Address address = factory.createSMTPAddress("alice@volantis.com");
        Recipient alice = factory.createRecipient(address, "Nokia-6600");
        alice.setChannel("smtp");

        SendRequest request = factory.createSendRequest();
        request.addRecipient(alice);

        Message message = factory.createMessage(
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

                SEND_REQUEST_BASIC_EMBEDDED_CONTENT.getBytes(UTF_8));
        SendRequest request = parser.readSendRequest(in);

        assertEquals(1, request.getRecipients().length);

        Recipient recipient = request.getRecipients()[0];
        assertEquals("alice@volantis.com", recipient.getAddress().getValue());
        assertEquals("smtp", recipient.getChannel());
        assertEquals("Nokia-6600", recipient.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, recipient.getRecipientType());

        assertEquals(MESSAGE,
                request.getMessage().getContent());

        assertNotNull("default sender", request.getSender());
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

            throws Exception {

        MessageFactory factory = MessageFactory.getDefaultInstance();

        Address address = factory.createSMTPAddress("alice@volantis.com");
        Recipient alice = factory.createRecipient(address, "Nokia-6600");
        alice.setChannel("smtp");

        SendRequest request = factory.createSendRequest();
        request.addRecipient(alice);

        Message message = factory.createMessage(MESSAGE);
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

        final Recipient[] recipients = request.getRecipients();

        assertEquals(4, recipients.length);

        Recipient alice = recipients[0];
        assertEquals("alice@volantis.com", alice.getAddress().getValue());
        assertEquals("smtp", alice.getChannel());
        assertEquals("Nokia-6600", alice.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, alice.getRecipientType());

        Recipient bob = recipients[1];
        assertEquals("bob@volantis.com", bob.getAddress().getValue());
        assertEquals("smtp", bob.getChannel());
        assertEquals("Nokia-6800", bob.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, bob.getRecipientType());

        Recipient carol = recipients[2];
        assertEquals("carol@volantis.com", carol.getAddress().getValue());
        assertEquals("smtp", carol.getChannel());
        assertEquals("SonyEriccson-973i", carol.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, carol.getRecipientType());

        Recipient dave = recipients[3];
        assertEquals("dave@volantis.com", dave.getAddress().getValue());
        assertEquals("smtp", dave.getChannel());
        assertEquals("Samsung-D700", dave.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, dave.getRecipientType());

        assertEquals("Goodbye", request.getMessage().getSubject());
        assertEquals(new URL("http://some.host.com:6000/volantis/welcome/welcome.xdime"),
                request.getMessage().getURL());
View Full Code Here

Examples of com.volantis.mps.bms.Recipient

        final Recipient[] recipients = request.getRecipients();

        assertEquals(1, recipients.length);

        Recipient alice = recipients[0];
        assertEquals("alice@volantis.com", alice.getAddress().getValue());
        assertEquals("smtp", alice.getChannel());
        assertEquals("Nokia-6600", alice.getDeviceName());
        assertEquals("Default type has been assigned",
                RecipientType.TO, alice.getRecipientType());

        assertEquals("Hello", request.getMessage().getSubject());
        assertEquals(new URL("http://localhost:8080/volantis/welcome/welcome.xdime"),
                request.getMessage().getURL());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.