001: /*
002: * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
003: * Reserved.
004: *
005: * This source code file is distributed by Lutris Technologies, Inc. for
006: * use only by licensed users of product(s) that include this source
007: * file. Use of this source file or the software that uses it is covered
008: * by the terms and conditions of the Lutris Enhydra Development License
009: * Agreement included with this product.
010: *
011: * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
012: * ANY KIND, either express or implied. See the License for the specific terms
013: * governing rights and limitations under the License.
014: *
015: * Contributor(s):
016: *
017: * $Id: Delivery.java,v 1.1 2004/05/19 18:15:19
018: */
019:
020: package com.lutris.airsent.spec.delivery;
021:
022: import com.lutris.airsent.spec.AirSentException;
023: import com.lutris.airsent.spec.customer.Customer;
024: import com.lutris.airsent.spec.messenger.Messenger;
025: import com.lutris.airsent.spec.address.Address;
026:
027: /**
028: * Delivery interface.
029: */
030: public interface Delivery {
031:
032: /**
033: * Maximum size of the description field
034: */
035: public static final int MAX_DESC = 1000;
036:
037: /**
038: * Maximum size of the description field
039: */
040: public static final int MAX_SIZE = 64;
041:
042: /**
043: * Gets the handle.
044: *
045: * @return handle
046: * @exception if an error occurs
047: */
048: public String getHandle() throws AirSentException;
049:
050: /**
051: * Gets pick up address for the order.
052: *
053: * @return pick up address
054: * @exception if an error occurs
055: */
056: public Address getPickUp() throws AirSentException;
057:
058: /**
059: * Gets the drop off address for the order
060: *
061: * @return drop off address
062: * @exception if an error occurs
063: */
064: public Address getDropOff() throws AirSentException;
065:
066: /**
067: * gets the customer
068: *
069: * @return customer
070: * @exception if an error occurs
071: */
072: public Customer getCustomer() throws AirSentException;
073:
074: /**
075: * Gets the messenger.
076: *
077: * @return messenger
078: * @exception if an error occurs
079: */
080: public Messenger getMessenger() throws AirSentException;
081:
082: /**
083: * Sets the messenger.
084: *
085: * @exception if an error occurs
086: * @exception if a business rule is violated
087: */
088: public void setMessenger(Messenger messenger)
089: throws AirSentException;
090:
091: /**
092: * gets the fragile flag
093: *
094: * @return true if fragile
095: * @exception if an error occurs
096: */
097: public boolean isFragile() throws AirSentException;
098:
099: /**
100: * sets the fragile flag
101: *
102: * @param fragile true if fragile
103: * @exception if an error occurs
104: */
105: public void setIsFragile(boolean fragile) throws AirSentException;
106:
107: /**
108: * gets the urgent flag
109: *
110: * @return true if urgent
111: * @exception if an error occurs
112: */
113: public boolean isUrgent() throws AirSentException;
114:
115: /**
116: * sets the urgent flag
117: *
118: * @param urgent true if urgent
119: * @exception if an error occurs
120: */
121: public void setIsUrgent(boolean urgent) throws AirSentException;
122:
123: /**
124: * gets the size description
125: *
126: * @return size
127: * @exception if an error occurs
128: */
129: public String getSize() throws AirSentException;
130:
131: /**
132: * sets the size for the order
133: *
134: * @param size size description
135: * @exception if an error occurs
136: */
137: public void setSize(String size) throws AirSentException;
138:
139: /**
140: * gets the descriton of the order
141: *
142: * @return descriotn
143: * @exception if an error occurs
144: */
145: public String getDescription() throws AirSentException;
146:
147: /**
148: * sets the order description
149: *
150: * @param description order description
151: * @exception if an error occurs
152: * @exception if the description is invalid
153: */
154: public void setDescription(String description)
155: throws AirSentException;
156:
157: /**
158: * saves the order
159: *
160: * @exception if an error occurs
161: */
162: public void save() throws AirSentException;
163:
164: /**
165: * deletes the order
166: *
167: * @exception if an error occurs
168: */
169: public void delete() throws AirSentException;
170:
171: /**
172: * returns the pick up statues
173: *
174: * @return true if order has been pickup
175: * @exception if an error occurs
176: */
177: public boolean isPickedUp() throws AirSentException;
178:
179: /**
180: * returns the drop off status
181: *
182: * @return true if the order has been dropped off
183: * @exception if an error occurs
184: */
185: public boolean isDroppedOff() throws AirSentException;
186:
187: /**
188: * Chnages the order to be 'picked up'
189: *
190: * @exception if an error occurs
191: */
192: public void pickUp() throws AirSentException;
193:
194: /**
195: * returns the pick up time
196: *
197: * @return pick up time
198: * @exception if an error occurs
199: */
200: public String getPickedUpTime() throws AirSentException;
201:
202: /**
203: * Changes the order to be in the 'drop off' state
204: *
205: * @exception if an error occurs
206: */
207: public void dropOff() throws AirSentException;
208:
209: /**
210: * returns the drop off time
211: *
212: * @return drop off time
213: * @exception if an error occurs
214: */
215: public String getDroppedOffTime() throws AirSentException;
216:
217: /*
218: *Gets the invoice number
219: */
220: public int getInvoice() throws AirSentException;
221:
222: /*
223: *Sets the invoice number
224: */
225: public void setInvoice(int size) throws AirSentException;
226: }
|