KickJava   Java API By Example, From Geeks To Geeks.

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


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: DeliveryManager.java,v 1.1 2004/05/19 18:15:19
18  */

19 package com.lutris.airsent.spec.delivery;
20
21 import com.lutris.airsent.spec.AirSentException;
22
23
24 import com.lutris.airsent.spec.customer.Customer;
25 import com.lutris.airsent.spec.messenger.Messenger;
26
27 /**
28  * DeliveryFactory Interface declaration
29  */

30 public interface DeliveryManager {
31
32     /**
33      * Create a new delivery.
34      *
35      * @param customer customer associated with the order
36      * @return delivey object
37      * @exception if an error occurs
38      */

39     public Delivery create(Customer customer)
40         throws AirSentException;
41
42     /**
43      * Create a delivery based on an order.
44      *
45      * @return delivey object
46      * @exception if an error occurs
47      * @exception if business rules are violated
48      */

49     public Delivery create(Customer customer, OrderForm orderForm)
50         throws AirSentException;
51
52     /**
53      * Gets the last update time.
54      *
55      * @param browserState
56      * @param wait
57      * @return update time
58      * @exception if an error occurs
59      */

60     public long getUpdate(long browserState, long wait)
61         throws AirSentException;
62
63     /**
64      * Find deliver by database id
65      *
66      * @param handle database id
67      * @return delivery
68      * @exception if an error occurs
69      */

70     public Delivery findByHandle(String JavaDoc handle)
71         throws AirSentException;
72
73     /**
74      * Find deliveries associated with a given customer
75      *
76      * @param customer the customer
77      * @return delivery
78      * @exception if an error occurs
79      */

80     public Delivery[] findByCustomer(Customer customer)
81         throws AirSentException;
82
83     /**
84      * Find deliveries by invoice
85      *
86      * @param invoice invoice id
87      * @return delivery
88      * @exception if an error occurs
89      */

90     public Delivery findByInvoice(int invoice)
91         throws AirSentException;
92
93     /**
94      * find all delivery objects not delivered
95      *
96      * @return delivery objects
97      * @exception if an error occurs
98      */

99     public Delivery[] findUndelivered()
100         throws AirSentException;
101
102     /**
103      * Find all the deliveries.
104      *
105      * @return delivery objects
106      * @exception if an error occurs
107      */

108     public Delivery[] findAll()
109         throws AirSentException;
110
111     /**
112      * Find all the deliveries after a given time.
113      *
114      * @param data time
115      * @return delivery objects
116      * @exception if an error occurs
117      */

118     public Delivery[] findAllAfter(long date)
119         throws AirSentException;
120
121     /**
122      * Find the specified number the deliveries.
123      *
124      * @param subset desired number of deliveries
125      * @return delivery objects
126      * @exception if an error occurs
127      */

128     public Delivery[] findSubset(int subset)
129         throws AirSentException;
130
131     /**
132      * find all deliveries associated with a given messenger
133      *
134      * @param messenger messenger
135      * @return delivery objects
136      * @exception if an error occurs
137      */

138     public Delivery[] findByMessenger(Messenger messenger)
139         throws AirSentException;
140
141 }
142
143
Popular Tags