org.liquidsite.app.template
Class GroupMailMessage

java.lang.Object
  extended byorg.liquidsite.util.mail.MailMessage
      extended byorg.liquidsite.app.template.GroupMailMessage

public class GroupMailMessage
extends MailMessage

A group email message. This class is used for creating email messages to all users in a group.


Constructor Summary
GroupMailMessage()
          Creates a new empty group mail message.
 
Method Summary
protected  javax.mail.internet.MimeMessage getNextMessage(javax.mail.Session session)
          Creates the next Java mail MIME message from this mail message.
 java.lang.String getRecipient()
          Returns a string representation of the message recipient.
protected  boolean hasMoreMessages()
          Checks if there remains any Java mail MIME messages to generate.
 void setRecipient(Group recipient)
          Sets the message recipient group.
 
Methods inherited from class org.liquidsite.util.mail.MailMessage
createMessage, getAttribute, getAttributeNames, getReplyTo, getReplyToAddress, getSubject, getText, isValid, setAttribute, setReplyTo, setSubject, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupMailMessage

public GroupMailMessage()
Creates a new empty group mail message.

Method Detail

getRecipient

public java.lang.String getRecipient()
Returns a string representation of the message recipient. This method is used for logging purposes, so the returned string shouldn't be too long.

Specified by:
getRecipient in class MailMessage
Returns:
the message recipient

setRecipient

public void setRecipient(Group recipient)
Sets the message recipient group.

Parameters:
recipient - the message recipient group

hasMoreMessages

protected boolean hasMoreMessages()
Checks if there remains any Java mail MIME messages to generate.

Specified by:
hasMoreMessages in class MailMessage
Returns:
true if there are more messages to generate, or false otherwise

getNextMessage

protected javax.mail.internet.MimeMessage getNextMessage(javax.mail.Session session)
                                                  throws MailMessageException
Creates the next Java mail MIME message from this mail message.

Specified by:
getNextMessage in class MailMessage
Parameters:
session - the Java mail session
Returns:
the Java MIME message created
Throws:
MailMessageException - if the message couldn't be created correctly