com.clra.web
Class ParticipationForm
java.lang.Object
|
+--org.apache.struts.action.ActionForm
|
+--com.clra.web.RowingSessionForm
|
+--com.clra.web.ParticipationForm
- All Implemented Interfaces:
- Serializable
- public final class ParticipationForm
- extends RowingSessionForm
Form bean for the session signup screen. A session signup screen contains
the same information as a rowing session screen, plus additional fields.
Here is a list of additions or differences, with default values in square
brackets:
- action
- The maintenance action that is being performed is restricted to
Create, Promote, Edit, View, Cancel or Delete. [Create]
- memberId
- The primary key of the member signing up for the session. [REQUIRED]
- rowingId
- The primary key of the rowing session. [REQUIRED]
- participantId
- The read-only id of the participant. [REQUIRED on Edit]
- seatPreference
- The requested seating for this participant. Null is valid only
if the participant is new or is to be removed.
Other allowed values are SeatPreference.NAME_STARBOARD,
SeatPreference.NAME_PORT, and so on.
[REQUIRED, null has significance]
- starboards
- A read-only iterator of "starboard" participants. Items are returned
as String values for display. [REQUIRED]
- ports
- A read-only iterator of "port" participants. Items are returned
as String values for display. [REQUIRED]
- coxswains
- A read-only iterator of "cox" participants. Items are returned
as String values for display. [REQUIRED]
- Version:
- $Revision: 1.2 $ $Date: 2002/01/30 15:24:38 $
- Author:
- Rick Hall
- See Also:
- Serialized Form
Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
Method Summary |
static String |
formatParticipantAsString(Participant2View p2)
A utility that creates a String representation of participant. |
Iterator |
getCoxswains()
Returns a read-only iterator of "coxswain" participants. |
Integer |
getMemberId()
Return the persistent id of the member |
Integer |
getParticipantId()
Return the primary key of the participant. |
Iterator |
getPorts()
Returns a read-only iterator of "port" participants. |
String |
getSeatPreference()
Return the seating preference of a participant. |
Iterator |
getStarboards()
Returns a read-only iterator of "starboard" participants. |
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Reset all properties to their default values. |
void |
setSeatPreference(String preference)
Set the seating preference of a participant. |
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Validate the properties that have been set from this HTTP request,
and return an ActionErrors object that encapsulates any
validation errors that have been found. |
Methods inherited from class com.clra.web.RowingSessionForm |
getAction, getAmPm, getCalendar, getDate, getDateTime, getDateTimeAsDateObject, getDay, getHour, getLevel, getMinute, getMonth, getRowingId, getState, getTime, getType, getYear, setAction, setAmPm, setCalendar, setDateTimeFromDate, setDay, setHour, setLevel, setMinute, setMonth, setState, setType, setYear |
Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, reset, setMultipartRequestHandler, setServlet, validate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParticipationForm
public ParticipationForm()
getMemberId
public Integer getMemberId()
- Return the persistent id of the member
getParticipantId
public Integer getParticipantId()
- Return the primary key of the participant. Null for new participants;
non-null otherwise.
getSeatPreference
public String getSeatPreference()
- Return the seating preference of a participant. Null is valid only
if the participant is new or is to be removed. Other allowed values are
SeatPreference.NAME_STARBOARD, SeatPreference.NAME_PORT,
and so on.
setSeatPreference
public void setSeatPreference(String preference)
- Set the seating preference of a participant. Null is valid only if
the participant is new or is to be removed. Other allowed values are
SeatPreference.NAME_STARBOARD, SeatPreference.NAME_PORT,
and so on.
getStarboards
public Iterator getStarboards()
- Returns a read-only iterator of "starboard" participants.
Items in the iteration are Strings, formatted for display on a screen.
getPorts
public Iterator getPorts()
- Returns a read-only iterator of "port" participants.
Items in the iteration are Strings, formatted for display on a screen.
getCoxswains
public Iterator getCoxswains()
- Returns a read-only iterator of "coxswain" participants.
Items in the iteration are Strings, formatted for display on a screen.
reset
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Reset all properties to their default values.
- Overrides:
reset
in class RowingSessionForm
- Parameters:
mapping
- The mapping used to select this instancerequest
- The servlet request we are processing
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Validate the properties that have been set from this HTTP request,
and return an
ActionErrors
object that encapsulates any
validation errors that have been found. If no errors are found, return
null
or an ActionErrors
object with no
recorded error messages.
- Overrides:
validate
in class RowingSessionForm
- Parameters:
mapping
- The mapping used to select this instancerequest
- The servlet request we are processing
formatParticipantAsString
public static String formatParticipantAsString(Participant2View p2)
- A utility that creates a String representation of participant.