summaryrefslogtreecommitdiffstats
path: root/src/org/uic/ticket/api/spec/IControlDetail.java
blob: dbfd001235d951bce64239c67eb618f4b317f649 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/*
 * 
 */
package org.uic.ticket.api.spec;

import java.util.Collection;

/**
 * The Interface IControlDetail.
 * 
 * 
 * IControlDetails provides data supporting the control process:
 *   --  - list of items which the traveler can use to identify himself or the unique
 *   --            usage of the ticket 
 *   --           (card ids, parts or identity card numbers, credit card numbers,..)
 *   --  - hints on the validation to be made on board
 */
public interface IControlDetail {
	
	/**
	 * Gets the card references the traveler can use to identify himself.
	 *
	 * @return the card references
	 */
	public Collection<ICardReference> getIdentificationByCardReference();
	


	/**
	 * Adds a card references the traveler can use to identify himself.
	 *
	 * @param cardReference the card reference
	 */
	public void addIdentificationByCardReference(ICardReference cardReference);
		

	/**
	 * Checks if the traveler can be identified by id card.
	 *
	 * @return true, if identification by id card is possible
	 */
	public boolean isIdentificationByIdCard();
	

	/**
	 * Sets whether the traveler can be identified by id card.
	 *
	 * @param identificationByIdCard the new identification by id card flag
	 */
	public void setIdentificationByIdCard(boolean identificationByIdCard);
	

	/**
	 * Checks whether the traveler can be identified by passport id.
	 *
	 * @return true, if the traveler can be identified by passport id
	 */
	public boolean isIdentificationByPassportId();
	

	/**
	 * Sets whether the traveler can be identified by passport id.
	 *
	 * @param identificationByPassportId the new identification by passport id flag
	 */
	public void setIdentificationByPassportId(boolean identificationByPassportId);
	

	/**
	 * Gets the identification item code.
	 * 
	 * For future use, no code list defined yet
	 *
	 * @return the identification item
	 */
	public int getIdentificationItem();
	

	/**
	 * Sets the identification item.
	 *
	 * For future use, no code list defined yet
	 *
	 * @param identificationItem the new identification item
	 */
	public void setIdentificationItem(int identificationItem);
	

	/**
	 * Checks if passport validation is required.
	 *
	 * @return true, if is passport validation required
	 */
	public boolean isPassportValidationRequired();
	

	/**
	 * Sets the passport validation required.
	 *
	 * @param passportValidationRequired the new passport validation required flag
	 */
	public void setPassportValidationRequired(boolean passportValidationRequired);
	

	/**
	 * Checks if is online validation required.
	 *
	 * In this case the ticket must be validated with the online server holding the ticket. 
	 * This is usually the server of the product owner of a ticket. 	 
	 *
	 * @return true, if is online validation required
	 */
	public boolean isOnlineValidationRequired();
	

	/**
	 * Sets the online validation required.
	 *
	 * In this case the ticket must be validated with the online server holding the ticket. 
	 * This is usually the server of the product owner of a ticket. 
	 *
	 * @param onlineValidationRequired the new online validation required
	 */
	public void setOnlineValidationRequired(boolean onlineValidationRequired);
	

	/**
	 * Gets the random detailed validation required.
	 *
	 * This indicates to the control device, that this ticket type should be
	 * checked in more detail in the indicated percentage of cases.
	 * 
	 *  The ticket type is identified by:
	 *  	- product owner
	 *  	- type of the ticket (Reservation, Open Ticket, Pass,..)	
	 *
	 *	The detailed inspection might be implemented by storing the entire bar code data for 
	 *  further inspection and in taking a picture of the paper ticket. 
	 *
	 * @return the random detailed validation required
	 */
	public int getRandomDetailedValidationRequired();
	

	/**
	 * Sets the random detailed validation required.
	 *
	 * This indicates to the control device, that this ticket type should be
	 * checked in more detail in the indicated percentage of cases.
	 * 
	 *  The ticket type is identified by:
	 *  	- product owner
	 *  	- type of the ticket (Reservation, Open Ticket, Pass,..)	
	 *
	 *	The detailed inspection might be implemented by storing the entire bar code data for 
	 *  further inspection and in taking a picture of the paper ticket. 
	 *
	 * @param randomOnlineValidationRequired the new random detailed validation required
	 */
	public void setRandomDetailedValidationRequired(int randomOnlineValidationRequired);
	

	/**
	 * Checks if an age check on the passengers is required.
	 *
	 * @return true, if an age check on the passengers is required
	 */
	public boolean isAgeCheckRequired();
	

	/**
	 * Sets whether an age check on the passengers is required.
	 *
	 * @param ageCheckRequired the new age check required flag
	 */
	public void setAgeCheckRequired(boolean ageCheckRequired);
	

	/**
	 * Checks if is reduction card check required.
	 *
	 * @return true, if is reduction card check required
	 */
	public boolean isReductionCardCheckRequired();
	

	/**
	 * Sets the reduction card check required.
	 *
	 * @param reductionCardCheckRequired the new reduction card check required
	 */
	public void setReductionCardCheckRequired(boolean reductionCardCheckRequired);
	

	/**
	 * Gets the info text for the control staff.
	 *
	 * @return the info text for the control staff
	 */
	public String getInfoText();
	

	/**
	 * Sets the info text for the control staff.
	 *
	 * @param infoText the new info text for the control staff
	 */
	public void setInfoText(String infoText);
	

	/**
	 * Gets the linked tickets.
	 *
	 * Linked tickets are separate tickets which should be included in the check. 
	 * E.g. A Rail Pass accompanying a Reservation with a tariff valid for passes only. 
	 *
	 * @return the linked tickets
	 */
	public Collection<ITicketLink> getLinkedTickets() ;
	

	/**
	 * Adds the linked ticket.
	 *
	 * Linked tickets are separate tickets which should be included in the check. 
	 * E.g. A Rail Pass accompanying a Reservation with a tariff valid for passes only. 
	 * 
	 * @param linkedTicket the linked ticket
	 */
	public void addLinkedTicket(ITicketLink linkedTicket) ;
	

	/**
	 * Gets the extension.
	 *
	 * @return the extension
	 */
	public IExtension getExtension();
	

	/**
	 * Sets the extension.
	 *
	 * @param extension the new extension
	 */
	public void setExtension(IExtension extension);
	        

}