com.arsdigita.acs.bboard
Class EmailQueue

java.lang.Object
  |
  +--com.arsdigita.acs.bboard.EmailQueue
All Implemented Interfaces:
DataSource

public final class EmailQueue
extends Object
implements DataSource

Maintains the list of people about to receive e-mail alerts for a particular bboard posting.


Field Summary
static int ALERT_INSTANT
           
static int ALERT_MAINTAINER
          Types of alerts
static int ALERT_THREAD
           
static int ALERT_UNKNOWN
           
 
Constructor Summary
EmailQueue()
           
 
Method Summary
 void add(int type, String to, String from, String subject, String body, String poster_email)
          Adds a recipient to this.
 void add(String to, String from, String subject, String body, String poster_email)
          Adds a recipient to this.
 boolean contains(String key)
          Returns true if column is a valid column in this datasource; returns false otherwise.
 String get(String key)
          Generic get-property method; returns the value of the column named by key for the currently active
 int getType()
           
 String[] keys()
          Returns a list of valid keys in this datasource, for use with get().
 boolean next()
          Advances to the next item, if there is one, and returns true; returns false otherwise.
 int rownum()
          Returns the current row number in the datasource.
 void send()
          Send e-mail messages for all queued alerts.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALERT_MAINTAINER

public static final int ALERT_MAINTAINER
Types of alerts

ALERT_THREAD

public static final int ALERT_THREAD

ALERT_INSTANT

public static final int ALERT_INSTANT

ALERT_UNKNOWN

public static final int ALERT_UNKNOWN
Constructor Detail

EmailQueue

public EmailQueue()
Method Detail

next

public boolean next()
Description copied from interface: DataSource
Advances to the next item, if there is one, and returns true; returns false otherwise.
Specified by:
next in interface DataSource

get

public String get(String key)
Description copied from interface: DataSource
Generic get-property method; returns the value of the column named by key for the currently active
Specified by:
get in interface DataSource

getType

public int getType()

contains

public boolean contains(String key)
Description copied from interface: DataSource
Returns true if column is a valid column in this datasource; returns false otherwise.
Specified by:
contains in interface DataSource

keys

public String[] keys()
Description copied from interface: DataSource
Returns a list of valid keys in this datasource, for use with get().
Specified by:
keys in interface DataSource

add

public final void add(String to,
                      String from,
                      String subject,
                      String body,
                      String poster_email)
Adds a recipient to this.
Parameters:
to - The e-mail recipient's e-mail address
from - The sender's e-mail address (e.g., bboard@arsdigita.com)
subject - The e-mail subject
body -  
poster_email - The e-mail address of the bboard msg poster

add

public final void add(int type,
                      String to,
                      String from,
                      String subject,
                      String body,
                      String poster_email)
Adds a recipient to this.
Parameters:
type - The type of email alert
to - The e-mail recipient's e-mail address
from - The sender's e-mail address (e.g., bboard@arsdigita.com)
subject - The e-mail subject
body -  
poster_email - The e-mail address of the bboard msg poster

send

public void send()
          throws MessagingException
Send e-mail messages for all queued alerts.

rownum

public int rownum()
Description copied from interface: DataSource
Returns the current row number in the datasource.
Specified by:
rownum in interface DataSource