|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrsvp.model.Event
public class Event
An Event models a social gathering. An event has a name, an organizer (i.e. host or hostess), a date, a location, and a collection of responses. An event also has a passcode, which the organizer will use to identify herself if she wishes to change the event at some point in the future.
| Field Summary |
|---|
| Fields inherited from interface rsvp.model.EventInterface |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
Event()
Constructs a new event with an empty collection of responses and an empty passcode. |
|
| Method Summary | |
|---|---|
void |
addResponse(Response response)
Adds a response from a potential guest at this event. |
void |
delete()
Deletes this event. |
SimpleDate |
getDate()
Returns the date of this Event. |
java.lang.String |
getLocation()
Returns the location of this Event. |
java.lang.String |
getName()
Gets the name of this Event. |
EmailAddressInterface |
getOrganizer()
Gets an EmailAddress object corresponding to the organizer/host of this event. |
java.lang.String |
getPasscode()
Returns the organizer's passcode, which should be supplied by a View that wishes to change this event. |
ResponseInterface |
getResponse(int n)
Returns the nth response provided for this Event. |
int |
getResponseCount()
Returns the number of Responses guests have provided for this event. |
boolean |
isDeleted()
Returns true if this event has been deleted. |
void |
setDate(SimpleDate date)
Sets the date of this Event. |
void |
setLocation(java.lang.String location)
Sets the location of this Event. |
void |
setName(java.lang.String name)
Sets the name for this Event. |
void |
setOrganizer(EmailAddressInterface organizer)
Sets the EmailAddress of the organizer for this event. |
void |
setPasscode(java.lang.String passcode)
Changes the organizer's passcode for this Event. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Event()
| Method Detail |
|---|
public SimpleDate getDate()
EventInterface
getDate in interface EventInterfacepublic void setDate(SimpleDate date)
EventInterface
setDate in interface EventInterfacedate - the new Date for this Event.public java.lang.String getLocation()
EventInterface
getLocation in interface EventInterfacepublic void setLocation(java.lang.String location)
EventInterface
setLocation in interface EventInterfacelocation - a String representing the new locationpublic java.lang.String getName()
EventInterface
getName in interface EventInterfacepublic void setName(java.lang.String name)
EventInterface
setName in interface EventInterfacename - a String describing this Event.public EmailAddressInterface getOrganizer()
EventInterface
getOrganizer in interface EventInterfacepublic void setOrganizer(EmailAddressInterface organizer)
EventInterface
setOrganizer in interface EventInterfaceorganizer - the EmailAddress of the organizerpublic java.lang.String getPasscode()
EventInterface
getPasscode in interface EventInterfacepublic void setPasscode(java.lang.String passcode)
EventInterface
setPasscode in interface EventInterfacepublic void addResponse(Response response)
EventInterface
addResponse in interface EventInterfaceresponse - a Response from a guest.public int getResponseCount()
EventInterface
getResponseCount in interface EventInterfacepublic ResponseInterface getResponse(int n)
EventInterfaceReturns the nth response provided for this Event. Throws a BogusParameterException if n is an invalid response index.
Precondition: 0 <= n < this.getReponseCount()
getResponse in interface EventInterfacen - an integer between 0 (inclusive) and this.getResponseCount() (exclusive)
public boolean isDeleted()
EventInterface
isDeleted in interface EventInterfacepublic void delete()
EventInterface
delete in interface EventInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||