com.xmlserv.app.basket
Class BasketRecipient

java.lang.Object
  |
  +--com.xmlserv.app.basket.BasketRecipient

public class BasketRecipient
extends java.lang.Object

This class is used to encapsulate the recipient of a basket, which can either be a Phonebook.Entry (single person) or a Mailinglist (group of persons).


Constructor Summary
BasketRecipient(java.sql.Connection con, Basket basket)
          Read recipient for given basket.
BasketRecipient(Mailinglist mailinglist)
           
BasketRecipient(PhoneBook.Entry entry)
           
BasketRecipient(User user)
           
 
Method Summary
 javax.mail.internet.InternetAddress[] getAddresses(java.sql.Connection con)
           
 void setAsRecipient(java.sql.Connection con, Basket basket)
          Set this Recipient as the recipient for the given basket.
 org.jdom.Element toElement(java.sql.Connection con)
          Return recipient as Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasketRecipient

public BasketRecipient(User user)

BasketRecipient

public BasketRecipient(PhoneBook.Entry entry)
                throws XMLServException

BasketRecipient

public BasketRecipient(Mailinglist mailinglist)
                throws XMLServException

BasketRecipient

public BasketRecipient(java.sql.Connection con,
                       Basket basket)
                throws XMLServException
Read recipient for given basket.
Method Detail

getAddresses

public javax.mail.internet.InternetAddress[] getAddresses(java.sql.Connection con)
                                                   throws XMLServException

setAsRecipient

public void setAsRecipient(java.sql.Connection con,
                           Basket basket)
                    throws XMLServException
Set this Recipient as the recipient for the given basket.

toElement

public org.jdom.Element toElement(java.sql.Connection con)
                           throws XMLServException
Return recipient as Element. This will either be a mailinglist Element or a phonebookentry Element.