rsvp.controller
Interface EventControllerInterface

All Known Implementing Classes:
EventController

public interface EventControllerInterface


Method Summary
 void addResponse(EmailAddressInterface guest, int status, java.lang.String comment)
          Adds a new response to this event, indicating whether or not a particular guest can attend.
 void delete(java.lang.String passcode)
          Deletes the given Event by invoking its delete() method.
 SimpleDate getEventDate()
          Returns the date of this event.
 java.lang.String getEventLocation()
          Returns the location of this event.
 java.lang.String getEventName()
          Returns the name of this event.
 EmailAddressInterface getEventOrganizer()
          Returns the EmailAddress of this event's organizer or host.
 ResponseControllerInterface getResponseController(int id)
          Returns a ResponseController to mediate access to the Response with the given ID.
 void setEventDate(SimpleDate date, java.lang.String passcode)
          Updates this event by changing its date.
 void setEventLocation(java.lang.String newLoc, java.lang.String passcode)
          Updates this event by changing its location.
 void setEventName(java.lang.String newName, java.lang.String passcode)
          Updates this event by changing its name.
 void setEventOrganizer(EmailAddressInterface email, java.lang.String passcode)
          Updates this event by changing its organizer.
 int totalResponsesForEvent()
          Returns the total number of responses for this event, including "yes", "no", and "maybe" responses.
 int yesResponsesForEvent()
          Returns the total number of "yes" responses for this event.
 

Method Detail

delete

void delete(java.lang.String passcode)
Deletes the given Event by invoking its delete() method. If the passcode supplied is not the same as the Event's passcode, this method will throw a PermissionException.

Parameters:
passcode - the passcode for this Event

setEventName

void setEventName(java.lang.String newName,
                  java.lang.String passcode)
Updates this event by changing its name. If the passcode supplied is not the same as the Event's passcode, this method will throw a PermissionException.

Parameters:
newName -
passcode -

setEventOrganizer

void setEventOrganizer(EmailAddressInterface email,
                       java.lang.String passcode)
Updates this event by changing its organizer. If the passcode supplied is not the same as the Event's passcode, this method will throw a PermissionException.

Parameters:
email - the email address of the new organizer
passcode -

setEventDate

void setEventDate(SimpleDate date,
                  java.lang.String passcode)
Updates this event by changing its date. If the passcode supplied is not the same as the Event's passcode, this method will throw a PermissionException.

Parameters:
date - the new date
passcode -

setEventLocation

void setEventLocation(java.lang.String newLoc,
                      java.lang.String passcode)
Updates this event by changing its location. If the passcode supplied is not the same as the Event's passcode, this method will throw a PermissionException.

Parameters:
newLoc - the new Location of this event
passcode -

getEventName

java.lang.String getEventName()
Returns the name of this event.

Returns:

getEventOrganizer

EmailAddressInterface getEventOrganizer()
Returns the EmailAddress of this event's organizer or host.

Returns:

getEventDate

SimpleDate getEventDate()
Returns the date of this event.

Returns:

getEventLocation

java.lang.String getEventLocation()
Returns the location of this event.

Returns:

totalResponsesForEvent

int totalResponsesForEvent()
Returns the total number of responses for this event, including "yes", "no", and "maybe" responses.

Returns:

yesResponsesForEvent

int yesResponsesForEvent()
Returns the total number of "yes" responses for this event.

Returns:

addResponse

void addResponse(EmailAddressInterface guest,
                 int status,
                 java.lang.String comment)
Adds a new response to this event, indicating whether or not a particular guest can attend.

Preconditions: see below.

Parameters:
guest - the email address of the responding guest. Must correspond to a valid email address -- if it does not, this method will throw a BogusParameterException.
status - the response status. Must be one of Response.YES, Response.NO, or Response.MAYBE -- if it is not, this method will throw a BogusParameterException.
comment - the text of any explanatory comment that this guest has included with her reply.

getResponseController

ResponseControllerInterface getResponseController(int id)
Returns a ResponseController to mediate access to the Response with the given ID. If the given ID is not valid, this method must throw a BogusParameterException.

Preconditions: id must be valid, as below.

Parameters:
id - a valid response identifier -- that is, one that is between 0 (inclusive) and totalResponsesForEvent() (exclusive)
Returns: