org.apache.servicemix.components.email
Class SimpleMailMarshaler

java.lang.Object
  extended by org.apache.servicemix.components.util.MarshalerSupport
      extended by org.apache.servicemix.components.email.MailMarshalerSupport
          extended by org.apache.servicemix.components.email.SimpleMailMarshaler

public class SimpleMailMarshaler
extends MailMarshalerSupport

The default marshaler from the NormalizedMessage to a SimpleMailMessage using expressions for each field required on the email.

Version:
$Revision: 2153 $

Constructor Summary
SimpleMailMarshaler()
           
 
Method Summary
protected  Object getBcc(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
           
protected  Object getCc(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
           
protected  String getFrom(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
           
protected  String getReplyTo(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
           
protected  Object getTo(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
           
 void prepareMessage(org.springframework.mail.SimpleMailMessage mailMessage, javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage normalizedMessage)
          Populates the mime email message with values extracted from the message exchange using expressions.
 
Methods inherited from class org.apache.servicemix.components.email.MailMarshalerSupport
asAddress, asAddressArray, asDate, asStringOrStringArray, getAttachments, getBcc, getCc, getDateFormat, getFrom, getHtml, getHtml, getReplyTo, getSentDate, getSentDate, getSubject, getSubject, getText, getText, getTo, setAttachments, setBcc, setCc, setDateFormat, setFrom, setHtml, setReplyTo, setSentDate, setSubject, setText, setTo
 
Methods inherited from class org.apache.servicemix.components.util.MarshalerSupport
asString, getTransformer, setTransformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMailMarshaler

public SimpleMailMarshaler()
Method Detail

prepareMessage

public void prepareMessage(org.springframework.mail.SimpleMailMessage mailMessage,
                           javax.jbi.messaging.MessageExchange exchange,
                           javax.jbi.messaging.NormalizedMessage normalizedMessage)
                    throws MessagingException
Populates the mime email message with values extracted from the message exchange using expressions.

Parameters:
mailMessage - the mime email
exchange - the JBI message exchange
normalizedMessage - the normalized message from JBI
Throws:
MessagingException - if the message could not be constructed or there was an error creating an address

getFrom

protected String getFrom(javax.jbi.messaging.MessageExchange exchange,
                         javax.jbi.messaging.NormalizedMessage normalizedMessage)
                  throws javax.jbi.messaging.MessagingException,
                         AddressException
Throws:
javax.jbi.messaging.MessagingException
AddressException

getReplyTo

protected String getReplyTo(javax.jbi.messaging.MessageExchange exchange,
                            javax.jbi.messaging.NormalizedMessage normalizedMessage)
                     throws javax.jbi.messaging.MessagingException
Throws:
javax.jbi.messaging.MessagingException

getTo

protected Object getTo(javax.jbi.messaging.MessageExchange exchange,
                       javax.jbi.messaging.NormalizedMessage normalizedMessage)
                throws javax.jbi.messaging.MessagingException,
                       AddressException
Throws:
javax.jbi.messaging.MessagingException
AddressException

getCc

protected Object getCc(javax.jbi.messaging.MessageExchange exchange,
                       javax.jbi.messaging.NormalizedMessage normalizedMessage)
                throws javax.jbi.messaging.MessagingException,
                       AddressException
Throws:
javax.jbi.messaging.MessagingException
AddressException

getBcc

protected Object getBcc(javax.jbi.messaging.MessageExchange exchange,
                        javax.jbi.messaging.NormalizedMessage normalizedMessage)
                 throws javax.jbi.messaging.MessagingException,
                        AddressException
Throws:
javax.jbi.messaging.MessagingException
AddressException


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.