Source code: com/clra/rowing/IParticipant.java
1 /*
2 * Copyright (c) Carnegie Lake Rowing Association 2002. All rights reserved.
3 * Distributed under the GPL license. See doc/COPYING.
4 * $RCSfile: IParticipant.java,v $
5 * $Date: 2003/02/26 03:38:45 $
6 * $Revision: 1.4 $
7 */
8
9 package com.clra.rowing;
10
11 import java.rmi.RemoteException;
12 import java.util.Date;
13 import java.util.Map;
14 import javax.ejb.EJBObject;
15
16 /**
17 * Defines operations that modify a member's participation in rowing session.
18 *
19 * @version $Id: IParticipant.java,v 1.4 2003/02/26 03:38:45 rphall Exp $
20 * @author <a href="mailto:rphall@pluto.njcc.com">Rick Hall</a>
21 */
22 public interface IParticipant extends EJBObject {
23
24 /** Returns a snapshot of a participant */
25 ParticipantSnapshot getData() throws RemoteException;
26
27 /** Returns the primary key of a participant */
28 Integer getParticipantId() throws RemoteException;
29
30 /**
31 * Returns the primary key of the rowing session to which the participant
32 * belongs.
33 */
34 Integer getRowingId() throws RemoteException;
35
36 /** Returns the primary key of the member that the participant represents */
37 Integer getMemberId() throws RemoteException;
38
39 /**
40 * Returns the seat preference of a participant.
41 * @return a non-null SeatPreference if the participant signed up
42 * in advance for the rowing session, or null if the participant
43 * joined the rowing session as an 'Extra' or as a substitute for
44 * another, signed-up participant.
45 */
46 SeatPreference getSeatPreference() throws RemoteException;
47
48 /**
49 * Sets the seat preference of a participant.
50 * @param a non-null seat preference
51 * @exception ParticipantStateException if a participant has already
52 * been assigned an initial or final seating for a rowing session, or
53 * if attendance has already been marked for the participant.
54 * @exception RowingException if a participant is not a signed-up
55 * participant. (An 'extra' or a 'substitute' participant can not be
56 * converted into a signed-up participant by setting a seat preference.)
57 */
58 void setSeatPreference( SeatPreference seatPreference )
59 throws RemoteException, ParticipantStateException, RowingException;
60
61 /**
62 * Returns the participant for whom this participant is substituting.
63 * @return a non-null IParticipant if this participant is a substitute,
64 * or null if this participant signed up or joined as an 'Extra'.
65 */
66 IParticipant getSubstitutedParticipant() throws RemoteException;
67
68 /**
69 * Assigns a preliminary seating to a participant before a rowing session
70 * starts.
71 * @exception ParticipantStateException if the participant
72 * has not signed up for the rowing session.
73 * @exception RowingException if the assignment conflicts with the
74 * business rules for updating a boating; for example, if the
75 * rowing session to which the boating belongs is not locked.
76 */
77 void setInitialSeat( SeatSnapshot seat, IBoating boating )
78 throws RemoteException, ParticipantStateException, RowingException;
79
80 /**
81 * Returns the initial seat assignment of this participant, or null
82 * if an initial seating was not made.
83 */
84 SeatSnapshot getInitialSeat() throws RemoteException;
85
86 /**
87 * Assigns a final seating to a participant at the start of a rowing
88 * session, after attendance has been taken.
89 *
90 * @param seat the final seating of a participant, or <tt>null</tt> if
91 * a participant is not boated for the session.
92 * @exception ParticipantStateException if the state of the participant
93 * conflicts with the seating assignment; for example, the participant
94 * is not present for the rowing session.
95 * @exception RowingException if the assignment conflicts with the
96 * business rules for updating a boating; for example, if the
97 * rowing session to which the boating belongs is not in the BOATING2 state.
98 */
99 void setFinalSeat( SeatSnapshot seat, IBoating boating )
100 throws RemoteException, ParticipantStateException, RowingException;
101
102 /**
103 * Returns the final seat assignment of this participant, or null
104 * if a final seating was not made.
105 */
106 SeatSnapshot getFinalSeat() throws RemoteException;
107
108 /**
109 * Marks the attendance of a participant at a rowing session.
110 * @exception ParticipantStateException if the instance data of the
111 * participant conflicts with marking attendance; for example, if the
112 * participant has already been assigned a final seating assignment, or
113 * if an "extra" participant is marked absent.
114 * @exception RowingException if marking attendance conflicts with the
115 * business rules for updating a rowing session; for example, if the
116 * rowing session is not in the BOATING1 state.
117 */
118 void setAttendance( Attendance attendance, IRowingSession session )
119 throws RemoteException, ParticipantStateException, RowingException;
120
121 /**
122 * Returns the attendance of a participant at a rowing session, or null
123 * if attendance has not been marked.
124 */
125 Attendance getAttendance() throws RemoteException;
126
127 } // IParticipant
128
129 /*
130 * $Log: IParticipant.java,v $
131 * Revision 1.4 2003/02/26 03:38:45 rphall
132 * Added copyright and GPL license
133 *
134 * Revision 1.3 2003/02/19 22:09:15 rphall
135 * Removed gratuitous use of CLRA acronym
136 *
137 */
138