|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrsvp.controller.EventController
public class EventController
An EventController mediates interactions between the view layer and a particular Event.
Event| Constructor Summary | |
|---|---|
EventController(EventInterface event)
Constructs an EventController to mediate access to a given Event. |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventController(EventInterface event)
event - | Method Detail |
|---|
public void delete(java.lang.String passcode)
EventControllerInterface
delete in interface EventControllerInterfacepasscode - the passcode for this Event
public void setEventName(java.lang.String newName,
java.lang.String passcode)
EventControllerInterface
setEventName in interface EventControllerInterface
public void setEventOrganizer(EmailAddressInterface email,
java.lang.String passcode)
EventControllerInterface
setEventOrganizer in interface EventControllerInterfaceemail - the email address of the new organizer
public void setEventDate(SimpleDate date,
java.lang.String passcode)
EventControllerInterface
setEventDate in interface EventControllerInterfacedate - the new date
public void setEventLocation(java.lang.String newLoc,
java.lang.String passcode)
EventControllerInterface
setEventLocation in interface EventControllerInterfacenewLoc - the new Location of this eventpublic java.lang.String getEventName()
EventControllerInterface
getEventName in interface EventControllerInterfacepublic EmailAddressInterface getEventOrganizer()
EventControllerInterface
getEventOrganizer in interface EventControllerInterfacepublic SimpleDate getEventDate()
EventControllerInterface
getEventDate in interface EventControllerInterfacepublic java.lang.String getEventLocation()
EventControllerInterface
getEventLocation in interface EventControllerInterfacepublic int totalResponsesForEvent()
EventControllerInterface
totalResponsesForEvent in interface EventControllerInterfacepublic int yesResponsesForEvent()
EventControllerInterface
yesResponsesForEvent in interface EventControllerInterface
public void addResponse(EmailAddressInterface guest,
int status,
java.lang.String comment)
EventControllerInterfacePreconditions: see below.
addResponse in interface EventControllerInterfaceguest - 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.public ResponseControllerInterface getResponseController(int id)
EventControllerInterfacePreconditions: id must be valid, as below.
getResponseController in interface EventControllerInterfaceid - a valid response identifier -- that is, one that is between 0 (inclusive) and totalResponsesForEvent() (exclusive)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||