KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > airsent > spec > delivery > Delivery


1 /*
2  * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
3  * Reserved.
4  *
5  * This source code file is distributed by Lutris Technologies, Inc. for
6  * use only by licensed users of product(s) that include this source
7  * file. Use of this source file or the software that uses it is covered
8  * by the terms and conditions of the Lutris Enhydra Development License
9  * Agreement included with this product.
10  *
11  * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
12  * ANY KIND, either express or implied. See the License for the specific terms
13  * governing rights and limitations under the License.
14  *
15  * Contributor(s):
16  *
17  * $Id: Delivery.java,v 1.1 2004/05/19 18:15:19
18  */

19
20 package com.lutris.airsent.spec.delivery;
21
22 import com.lutris.airsent.spec.AirSentException;
23 import com.lutris.airsent.spec.customer.Customer;
24 import com.lutris.airsent.spec.messenger.Messenger;
25 import com.lutris.airsent.spec.address.Address;
26
27
28 /**
29  * Delivery interface.
30  */

31 public interface Delivery {
32
33     /**
34      * Maximum size of the description field
35      */

36     public static final int MAX_DESC = 1000;
37
38     /**
39      * Maximum size of the description field
40      */

41     public static final int MAX_SIZE = 64;
42
43     /**
44      * Gets the handle.
45      *
46      * @return handle
47      * @exception if an error occurs
48      */

49     public String JavaDoc getHandle()
50         throws AirSentException;
51
52     /**
53      * Gets pick up address for the order.
54      *
55      * @return pick up address
56      * @exception if an error occurs
57      */

58     public Address getPickUp()
59         throws AirSentException;
60
61     /**
62      * Gets the drop off address for the order
63      *
64      * @return drop off address
65      * @exception if an error occurs
66      */

67     public Address getDropOff()
68         throws AirSentException;
69
70     /**
71      * gets the customer
72      *
73      * @return customer
74      * @exception if an error occurs
75      */

76     public Customer getCustomer()
77         throws AirSentException;
78     
79     /**
80      * Gets the messenger.
81      *
82      * @return messenger
83      * @exception if an error occurs
84      */

85     public Messenger getMessenger()
86         throws AirSentException;
87
88     /**
89      * Sets the messenger.
90      *
91      * @exception if an error occurs
92      * @exception if a business rule is violated
93      */

94     public void setMessenger(Messenger messenger)
95         throws AirSentException;
96
97     /**
98      * gets the fragile flag
99      *
100      * @return true if fragile
101      * @exception if an error occurs
102      */

103     public boolean isFragile()
104         throws AirSentException;
105
106     /**
107      * sets the fragile flag
108      *
109      * @param fragile true if fragile
110      * @exception if an error occurs
111      */

112     public void setIsFragile(boolean fragile)
113         throws AirSentException;
114
115     /**
116      * gets the urgent flag
117      *
118      * @return true if urgent
119      * @exception if an error occurs
120      */

121     public boolean isUrgent()
122         throws AirSentException;
123
124     /**
125      * sets the urgent flag
126      *
127      * @param urgent true if urgent
128      * @exception if an error occurs
129      */

130     public void setIsUrgent(boolean urgent)
131         throws AirSentException;
132
133     /**
134      * gets the size description
135      *
136      * @return size
137      * @exception if an error occurs
138      */

139     public String JavaDoc getSize()
140         throws AirSentException;
141
142     /**
143      * sets the size for the order
144      *
145      * @param size size description
146      * @exception if an error occurs
147      */

148     public void setSize(String JavaDoc size)
149         throws AirSentException;
150
151     /**
152      * gets the descriton of the order
153      *
154      * @return descriotn
155      * @exception if an error occurs
156      */

157     public String JavaDoc getDescription()
158         throws AirSentException;
159
160     /**
161      * sets the order description
162      *
163      * @param description order description
164      * @exception if an error occurs
165      * @exception if the description is invalid
166      */

167     public void setDescription(String JavaDoc description)
168         throws AirSentException;
169
170     /**
171      * saves the order
172      *
173      * @exception if an error occurs
174      */

175     public void save()
176         throws AirSentException;
177
178     /**
179      * deletes the order
180      *
181      * @exception if an error occurs
182      */

183     public void delete()
184         throws AirSentException;
185
186     /**
187      * returns the pick up statues
188      *
189      * @return true if order has been pickup
190      * @exception if an error occurs
191      */

192     public boolean isPickedUp()
193         throws AirSentException;
194
195     /**
196      * returns the drop off status
197      *
198      * @return true if the order has been dropped off
199      * @exception if an error occurs
200      */

201     public boolean isDroppedOff()
202         throws AirSentException;
203
204     /**
205      * Chnages the order to be 'picked up'
206      *
207      * @exception if an error occurs
208      */

209     public void pickUp()
210         throws AirSentException;
211
212     /**
213      * returns the pick up time
214      *
215      * @return pick up time
216      * @exception if an error occurs
217      */

218     public String JavaDoc getPickedUpTime()
219         throws AirSentException;
220
221     /**
222      * Changes the order to be in the 'drop off' state
223      *
224      * @exception if an error occurs
225      */

226     public void dropOff()
227         throws AirSentException;
228
229     /**
230      * returns the drop off time
231      *
232      * @return drop off time
233      * @exception if an error occurs
234      */

235     public String JavaDoc getDroppedOffTime()
236         throws AirSentException;
237
238     /*
239      *Gets the invoice number
240      */

241     public int getInvoice()
242         throws AirSentException;
243
244     /*
245      *Sets the invoice number
246      */

247     public void setInvoice(int size)
248         throws AirSentException;
249 }
250
251
Popular Tags