Interface MailerIntf

All Superinterfaces:
Serializable

public interface MailerIntf extends Serializable
From within the calendar system we have the following mailing needs:
  • When an event is added/changed/deleted mail the chnage to all subscribers to that events calendar.
  • When an email alarm fires, mail something, including the event, to the alarm receiver

Over time other needs may present themselves.

The subscribed case can be thought of as a mailing list. For each calendar, we have a list of subscribers who want events emailed. When a change occurs to the calendar we send the message out on the list. This interface allows implementors to use a list server to handle the, possibly large amount of, mail generated by this system.

The second case is less easily optimized. Each email is unique in content and usually has only one recipient.

In both cases it is useful to have some sort of mechanism for determining bad addresses. List servers often have their own mechanisms which usually result in a recipient being eventually deleted from the list. Thsi interface allows the calendar system to query the state of a given recipient on the list.

Because we are probably interfacing to a system which identifies users solely by their email-address, we have to give that system the chance to update itself correctly when the users email is changed. We present the new address to the system as well as the old one.

Author:
Mike Douglass douglm@bedework.edu
  • Method Details

    • init

      void init(MailConfigProperties config)
      Parameters:
      config - MailConfigProperties object
    • mailEntity

      boolean mailEntity(net.fortuna.ical4j.model.Calendar cal, String originator, Collection<String> recipients, String subject)
      Mail the given calendar object to the given list of recipients
      Parameters:
      cal - The rfc2445,6,7 object
      originator - - null if we use configured default
      recipients - list of recipients
      subject -
      Returns:
      boolean true if message sent, false - probably disabled.
    • addList

      void addList(BwCalendar cal)
      Add a list corresponding to the given calendar.
      Parameters:
      cal -
    • deleteList

      void deleteList(BwCalendar cal)
      Delete a list corresponding to the given calendar.
      Parameters:
      cal -
    • listLists

      Collection<String> listLists()
      Return a collection of mail list ids
      Returns:
      collection of mail list ids
    • checkList

      boolean checkList(BwCalendar cal)
      Check a list corresponding to the given calendar exists.
      Parameters:
      cal -
      Returns:
      true if list exists
    • postList

      void postList(BwCalendar cal, Message val)
      Post a message to the list corresponding to the given calendar.
      Parameters:
      cal -
      val -
    • addMember

      void addMember(BwCalendar cal, BwPrincipal<?> member)
      Add a member to the list corresponding to the given calendar.
      Parameters:
      cal -
      member -
    • removeMember

      void removeMember(BwCalendar cal, BwPrincipal<?> member)
      Remove a member from the list corresponding to the given calendar.
      Parameters:
      cal -
      member -
    • checkMember

      boolean checkMember(BwCalendar cal, BwPrincipal<?> member)
      Check a member is on the list corresponding to the given calendar.
      Parameters:
      cal -
      member -
      Returns:
      boolean
    • updateMember

      void updateMember(BwCalendar cal, BwPrincipal<?> member, String newEmail)
      Update a members email address on the list corresponding to the given calendar.
      Parameters:
      cal -
      member -
      newEmail -
    • listMembers

      Collection<BwPrincipal<?>> listMembers(BwCalendar cal)
      List members on the list corresponding to the given calendar. This requires that the implementation has access to the database to match emails against members.
      Parameters:
      cal -
      Returns:
      Collection
    • post

      void post(Message val)
      Parameters:
      val -