rsvp.model
Interface EventInterface

All Known Implementing Classes:
Event

public interface EventInterface


Field Summary
static long serialVersionUID
          All classes in the RSVP application must declare a public static final long field called serialVersionUID.
 
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.
 

Field Detail

serialVersionUID

static final long serialVersionUID
All classes in the RSVP application must declare a public static final long field called serialVersionUID.

See Also:
Constant Field Values
Method Detail

getDate

SimpleDate getDate()
Returns the date of this Event.

Returns:
the date of this Event.

setDate

void setDate(SimpleDate date)
Sets the date of this Event.

Parameters:
date - the new Date for this Event.

getLocation

java.lang.String getLocation()
Returns the location of this Event.

Returns:
the location of this Event.

setLocation

void setLocation(java.lang.String location)
Sets the location of this Event.

Parameters:
location - a String representing the new location

getName

java.lang.String getName()
Gets the name of this Event.

Returns:
a String describing this Event.

setName

void setName(java.lang.String name)
Sets the name for this Event.

Parameters:
name - a String describing this Event.

getOrganizer

EmailAddressInterface getOrganizer()
Gets an EmailAddress object corresponding to the organizer/host of this event.

Returns:
the EmailAddress of the host

setOrganizer

void setOrganizer(EmailAddressInterface organizer)
Sets the EmailAddress of the organizer for this event.

Parameters:
organizer - the EmailAddress of the organizer

getPasscode

java.lang.String getPasscode()
Returns the organizer's passcode, which should be supplied by a View that wishes to change this event.

Returns:
the passcode needed to change this Event.

setPasscode

void setPasscode(java.lang.String passcode)
Changes the organizer's passcode for this Event.

Parameters:
passcode -

addResponse

void addResponse(Response response)
Adds a response from a potential guest at this event.

Parameters:
response - a Response from a guest.

getResponseCount

int getResponseCount()
Returns the number of Responses guests have provided for this event.

Returns:
the number of responses for this event.

getResponse

ResponseInterface getResponse(int n)

Returns the nth response provided for this Event. Throws a BogusParameterException if n is an invalid response index.

Precondition: 0 <= n < this.getReponseCount()

Parameters:
n - an integer between 0 (inclusive) and this.getResponseCount() (exclusive)
Returns:
the nth response provided for this Event.

isDeleted

boolean isDeleted()
Returns true if this event has been deleted. A deleted event should be ignored by the interface.

Returns:
true if this event has been deleted, and false otherwise.

delete

void delete()
Deletes this event. The only effect this has is to change the value that this object's isDeleted() method will return.