KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sellwin > server > SellwinSession


1 package sellwin.server;
2
3 import javax.ejb.*;
4 import java.util.*;
5 import java.rmi.*;
6
7 import sellwin.domain.*;
8
9 // SellWin http://sourceforge.net/projects/sellwincrm
10
//Contact support@open-app.com for commercial help with SellWin
11
//This software is provided "AS IS", without a warranty of any kind.
12

13 /**
14  * the methods of this interface are the methods that
15  * a client (Main.java) has access to over a network.
16  *
17  * This interface is implemented by code which gets
18  * generated by the EJB container. The generated code
19  * delegates to the SellwinSessionBean.java class that
20  * we have written.
21  */

22 public interface SellwinSession extends EJBObject {
23
24
25     /**
26      * get US tax table
27      * @param lastSyncDate a user's last sync date used to
28      * limit the query, if null, no limiting
29      * @return the ArrayList of StateTax objects
30      */

31      public ArrayList getStateTax(java.util.Date JavaDoc lastSyncDate)
32         throws RemoteException, AngError;
33
34     /**
35      * get an index of Opportunities for a given user
36      * @param u the SalesPerson we are searching for
37      * @return the ArrayList of OppIndex objects that were found
38      * @exception AngError thrown when an app error occurs
39      */

40     public ArrayList getOpportunityIndex(SalesPerson u)
41         throws RemoteException, AngError;
42
43     /**
44      * get the list of Products that are offered
45      * @return the ArrayList of Products found
46      * @exception AngError thrown when an app error occurs
47      */

48     public ArrayList getProductMatrix()
49         throws RemoteException, AngError;
50
51     /**
52      * get the list of Product Groups
53      * @return the ArrayList of product groups that were found
54      * @exception AngError thrown when an app error occurs
55      */

56     public ArrayList getProductGroups()
57         throws RemoteException, AngError;
58
59     /**
60      * get the list of product lines
61      * @param group search using this passed product group as key
62      * @return the ArrayList of product lines that was found
63      * @exception AngError thrown when an app error occurs
64      */

65     public ArrayList getProductLines(String JavaDoc group)
66         throws RemoteException, AngError;
67
68     /**
69      * get the products for a product line and group
70      * @param group the product group to search in
71      * @param line the product line to search in
72      * @return the ArrayList of products found
73      * @exception AngError thrown when an app error occurs
74      */

75     public ArrayList getProductsForLine(String JavaDoc group, String JavaDoc line)
76         throws RemoteException, AngError;
77
78     /**
79      * get a product
80      * @param group product group to search in
81      * @param line product line to search in
82      * @param name product name to search for
83      * @return the Product that was found
84      * @exception AngError thrown when an app error occurs
85      */

86     public Product getProduct(String JavaDoc group, String JavaDoc line, String JavaDoc name)
87         throws RemoteException, AngError;
88
89     /**
90      * add a forecast
91      * @param opportunityPK the containing Opportunity primary key
92      * @param a the Forecast we are adding
93      * @return the primary key of the new Forecast
94      * @exception AngError thrown when an app error occurs
95      */

96     public long addForecast(long opportunityPK, Forecast a)
97         throws RemoteException, AngError;
98
99     /**
100      * update a Forecast
101      * @param oppPK the containing Opportunity primary key
102      * @param a the Forecast we are updating
103      * @exception AngError thrown when an app error occurs
104      */

105     public void updateForecast(long oppPK, Forecast a)
106         throws RemoteException, AngError;
107
108     /**
109      * delete a Forecast
110      * @param opportunityPK the containing Opportunity primary key
111      * @param forecastPK the Forecast primary key we delete with
112      * @exception AngError thrown when an app error occurs
113      */

114     public void deleteForecast(long opportunityPK, long forecastPK)
115         throws RemoteException, AngError;
116
117     /**
118      * add an Order
119      * @param oppPK the containing Opportunity primary key
120      * @param o the Order we are adding
121      * @return the primary key of the new Order
122      * @exception AngError thrown when an app error occurs
123      */

124     public long addOrder(long oppPK, Order o)
125         throws RemoteException, AngError;
126
127     /**
128      * update an Order
129      * @param oppPK the containing Opportunity primary key
130      * @param o the Order we are updating
131      * @exception AngError thrown when an app error occurs
132      */

133     public void updateOrder(long oppPK, Order o)
134         throws RemoteException, AngError;
135
136     /**
137      * add a Quote
138      * @param oppPK the containing Opportunity primary key
139      * @param q the Quote being added
140      * @return the primary key of the new Quote
141      * @exception AngError thrown when an app error occurs
142      */

143     public long addQuote(long oppPK, Quote q)
144         throws RemoteException, AngError;
145
146     /**
147      * update a Quote
148      * @param oppPK the containing Opportunity primary key
149      * @param q the Quote being updated
150      * @exception AngError thrown when an app error occurs
151      */

152     public void updateQuote(long oppPK, Quote q)
153         throws RemoteException, AngError;
154
155     /**
156      *
157      * @param name description
158      * @return description
159      * @exception AngError thrown when an app error occurs
160      */

161     public void deleteQuote(long opportuntityPK, long quotePK)
162         throws RemoteException, AngError;
163
164     /**
165      * add a QuoteLine
166      * @param oppPK the containing Opportunity primary key
167      * @param quotePK the containing Quote primary key
168      * @param a the QuoteLine being added
169      * @return the primary key of the newly added QuoteLine
170      * @exception AngError thrown when an app error occurs
171      */

172     public long addQuoteLine(long oppPK, long quotePK, QuoteLine a)
173         throws RemoteException, AngError;
174
175     /**
176      *
177      * @param name description
178      * @return description
179      * @exception AngError thrown when an app error occurs
180      */

181     public void deleteQuoteLine(long opportuntityPK, long quotePK, long linePK)
182         throws RemoteException, AngError;
183
184     /**
185      * get the Alarms for a user
186      * @param salesPersonPK the primary key of the user to search for
187      * @return the ArrayList of Alarms found
188      * @exception AngError thrown when an app error occurs
189      */

190     public ArrayList getAlarms(long salesPersonPK)
191         throws RemoteException, AngError;
192         
193     /**
194      * add an Activity
195      * @param opportunityPK the containing Opportunity primary key
196      * @param a the Activity we are adding
197      * @return the newly added Activity primary key
198      * @exception AngError thrown when an app error occurs
199      */

200     public long addActivity(long opportunityPK, Activity a)
201         throws RemoteException, AngError;
202
203     /**
204      * update an Actvitity
205      * @param opportunityPK the containing Opportunity primary key
206      * @param a the Activity being updated
207      * @exception AngError thrown when an app error occurs
208      */

209     public void updateActivity(long opportunityPK, Activity a)
210         throws RemoteException, AngError;
211
212     /**
213      * delete an Activity
214      * @param opportunityPK the containing Opportunity primary key
215      * @param activityPK the Activity primary key we delete with
216      * @exception AngError thrown when an app error occurs
217      */

218     public void deleteActivity(long opportunityPK, long activityPK)
219         throws RemoteException, AngError;
220
221
222     /**
223      * get all the user roles
224      * @param lastSyncDate the last user sync date we used to
225      * limit the query
226      * @return the ArrayList of found user roles
227      * @exception AngError thrown when an app error occurs
228      */

229     public ArrayList getAllUserRoles(java.util.Date JavaDoc lastSyncDate)
230         throws RemoteException, AngError;
231
232     /**
233      * add a user role
234      * @param role the UserRole we are adding to the system
235      * @exception AngError thrown when an app error occurs
236      */

237     public void addUserRole(UserRole role)
238         throws RemoteException, AngError;
239
240     /**
241      * delete a user role
242      * @param pk the pk of the user role we are deleting
243      * @exception AngError thrown when an app error occurs
244      */

245     public void deleteUserRole(long pk)
246         throws RemoteException, AngError;
247
248     /**
249      * udpate a user role
250      * @param role the UserRole we are updating
251      * @exception AngError thrown when an app error occurs
252      */

253     public void updateUserRole(UserRole role)
254         throws RemoteException, AngError;
255     
256     /**
257      * get a user role
258      * @param name the name of the user role we search for
259      * @return the UserRole that was found
260      * @exception AngError thrown when an app error occurs
261      */

262     public UserRole getUserRole(String JavaDoc name)
263         throws RemoteException, AngError;
264
265     /**
266      * logon to SellWin
267      * @param id the user ID to try
268      * @param psw the password to try
269      * @return a Login object if successful
270      * @exception AngError thrown when an app error occurs
271      */

272     public Login logon(String JavaDoc id, String JavaDoc psw)
273         throws RemoteException, AngError;
274
275     /**
276      * delete a Customer
277      * @param name the name of the Customer we are to delete
278      * @exception AngError thrown when an app error occurs
279      */

280     public void deleteCustomer(String JavaDoc name)
281         throws RemoteException, AngError;
282
283     /**
284      * update a Customer
285      * @param c the Customer we are updating
286      * @exception AngError thrown when an app error occurs
287      */

288     public void updateCustomer(Customer c)
289         throws RemoteException, AngError;
290
291     /**
292      * add a Customer
293      * @param c the Customer we are adding
294      * @return the new Customer's primary key
295      * @exception AngError thrown when an app error occurs
296      */

297     public long addCustomer(Customer c)
298         throws RemoteException, AngError;
299
300     /**
301      * get a Customer
302      * @param name the name of the Customer we are to get
303      * @return the Customer that was found
304      * @exception AngError thrown when an app error occurs
305      */

306     public Customer getCustomer(String JavaDoc name)
307         throws RemoteException, AngError;
308
309     /**
310      * get all the customer names in the system
311      * @return an array of the customer names
312      * @exception AngError thrown when an app error occurs
313      */

314     public Object JavaDoc[] getAllCustomerNames()
315         throws RemoteException, AngError;
316
317     /**
318      * get all the customers in the system
319      * @param lastSyncDate a user's last sync date used to limit
320      * the query or null if no limit
321      * @return an ArrayList of Customers
322      * @exception AngError thrown when an app error occurs
323      */

324     public ArrayList getCustomers(java.util.Date JavaDoc lastSyncDate)
325         throws RemoteException, AngError;
326
327     /**
328      * add a Product
329      * @param p the Product we are adding
330      * @exception AngError thrown when an app error occurs
331      */

332     public void addProduct(Product p)
333         throws RemoteException, AngError;
334     
335     /**
336      * get all Products
337      * @param a date to compare with in the query
338      * @return an ArrayList of products that was found
339      * @exception AngError thrown when an app error occurs
340      */

341     public ArrayList getProducts(java.util.Date JavaDoc afterDate)
342         throws RemoteException, AngError;
343
344     /**
345      * get all the Opportunity names for a user
346      * @param u the user we are searching for
347      * @return an ArrayList of opportunity names
348      * @exception AngError thrown when an app error occurs
349      */

350     public ArrayList getOpportunityNames(SalesPerson u)
351         throws RemoteException, AngError;
352
353     /**
354      * get all the Opportunities for a user
355      * @param u the user we are searching for
356      * @param lastSyncDate a user's last sync date to limit the query with
357      * or null if no limit is to be applied
358      * @return an ArrayList of Opportunities
359      * @exception AngError thrown when an app error occurs
360      */

361     public ArrayList getOpportunities(SalesPerson u, java.util.Date JavaDoc lastSyncDate)
362         throws RemoteException, AngError;
363
364     /**
365      * get an Opportunity
366      * @param pk an Opportunity primary key we are searching for
367      * @return an Opportunity
368      * @exception AngError thrown when an app error occurs
369      */

370     public Opportunity getOpportunity(long pk)
371         throws RemoteException, AngError;
372
373     /**
374      * add an Opportunity
375      * @param o the Opportunity we are adding
376      * @return the primary key of the newly added object
377      * @exception AngError thrown when an app error occurs
378      */

379     public long addOpportunity(Opportunity o)
380         throws RemoteException, AngError;
381
382     /**
383      * update an Opportunity
384      * @param o the Opportunity we are updating
385      * @exception AngError thrown when an app error occurs
386      */

387     public void updateOpportunity(Opportunity o)
388         throws RemoteException, AngError;
389
390     /**
391      * delete an Opportunity
392      * @param pk the primary key of the Opportunity to delete
393      * @exception AngError thrown when an app error occurs
394      */

395     public void deleteOpportunity(long pk)
396         throws RemoteException, AngError;
397
398     /**
399      * delete a contact
400      * @param oppPK the containing Opportunity's primary key
401      * @param contPK the Contact's primary key we delete with
402      * @exception AngError thrown when an app error occurs
403      */

404     public void deleteContact(long oppPk, long contPk)
405         throws RemoteException, AngError;
406
407     /**
408      * add a contact
409      * @param oppPK the containing Opportunity's primary key
410      * @param c the Contact we are adding
411      * @return the primary key of the new Contact
412      * @exception AngError thrown when an app error occurs
413      */

414     public long addContact(long oppPk, Contact c)
415         throws RemoteException, AngError;
416
417     /**
418      * update a contact
419      * @param oppPK the containing Opportunity primary key
420      * @param c the contact we are updating
421      * @exception AngError thrown when an app error occurs
422      */

423     public void updateContact(long oppPK, Contact c)
424         throws RemoteException, AngError;
425
426     /**
427      * get a sales person
428      * @param pk the pk to search with
429      * @return the SalesPerson that was found
430      * @exception AngError thrown when an app error occurs
431      */

432     public SalesPerson getSalesPerson(long pk)
433         throws RemoteException, AngError;
434
435     /**
436      * update a sales person
437      * @param s the sales person we are updating
438      * @exception AngError thrown when an app error occurs
439      */

440     public void updateSalesPerson(SalesPerson s)
441         throws RemoteException, AngError;
442
443     /**
444      * delete a sales person
445      * @param sp the sales person we are to delete
446      * @exception AngError thrown when an app error occurs
447      */

448     public void deleteSalesPerson(SalesPerson sp)
449         throws RemoteException, AngError;
450
451     /**
452      * add a sales person
453      * @param s the sales person we are adding
454      * @return the primary key of the newly added person
455      * @exception AngError thrown when an app error occurs
456      */

457     public long addSalesPerson(SalesPerson s)
458         throws RemoteException, AngError;
459
460     /**
461      * get all sales person logon IDs
462      * @return an ArrayList of user IDs
463      * @exception AngError thrown when an app error occurs
464      */

465     public ArrayList getSalesPersonIDs()
466         throws RemoteException, AngError;
467
468     /**
469      * get all sales person names
470      * @return an ArrayList of sales person names
471      * @exception AngError thrown when an app error occurs
472      */

473     public ArrayList getSalesPersonNames()
474         throws RemoteException, AngError;
475
476     /**
477      * get all sales persons
478      * @param a user's last sync date or null if the query is not
479      * to be limited
480      * @return an array of SalesPerson objects
481      * @exception AngError thrown when an app error occurs
482      */

483     public Object JavaDoc[] getSalesPersons(java.util.Date JavaDoc lastSyncDate)
484         throws RemoteException, AngError;
485
486
487     /**
488      * get the groups a user belongs to
489      * @param userPK the user primary key to search with
490      * @return an ArrayList of UserGroup objects
491      */

492     public ArrayList getGroupsForUser(long userPK)
493         throws RemoteException, AngError;
494
495     /**
496      * add a user to a user group
497      * @param userPK the user primary key to add
498      * @param group the user group to add to
499      * @exception AngError thrown when an app error occurs
500      */

501     public void addUserToGroup(long userPK, UserGroup group)
502         throws RemoteException, AngError;
503
504
505      //THIS NEEDS TO BE OPTIMIZED, TO ONLY RETURN NAMES, NOT THE
506
//FULL SP
507
/**
508      * get all users in a group
509      *
510      * @param groupName the group we are searching with
511      * @return an ArrayList of SalesPersons that were found in the group
512      * @exception AngError thrown when an app error occurs
513      */

514     public Object JavaDoc[] getUsersInGroup(String JavaDoc groupName)
515         throws RemoteException, AngError;
516
517     /**
518      * get a UserGroup using it's primary key
519      * @param pk user group primary key
520      * @return a UserGroup if found, else null
521      * @exception AngError thrown when an app error occurs
522      */

523     public UserGroup getUserGroup(long pk)
524         throws RemoteException, AngError;
525
526     /**
527      * get all user groups
528      * @param lastSyncDate a user's last sync date which limits the query
529      * @return an array of UserGroup
530      * @exception AngError thrown when an app error occurs
531      */

532     public Object JavaDoc[] getUserGroups(java.util.Date JavaDoc lastSyncDate)
533         throws RemoteException, AngError;
534
535     /**
536      * add a user group
537      * @param g the user group to add
538      * @exception AngError thrown when an app error occurs
539      */

540     public void addUserGroup(UserGroup g)
541         throws RemoteException, AngError;
542
543     /**
544      * delete a user group
545      * @param groupName the user group name we are to delete
546      * @exception AngError thrown when an app error occurs
547      */

548     public void deleteUserGroup(String JavaDoc groupName)
549         throws RemoteException, AngError;
550
551     /**
552      * delete a user in a group
553      * @param g the user group to search in
554      * @param userPK the user primary key to delete
555      * @exception AngError thrown when an app error occurs
556      */

557     public void deleteUserInGroup(UserGroup g, long userPK)
558         throws RemoteException, AngError;
559
560     /**
561      * update a lead
562      * @param campaignPK the containing Campaign primary key
563      * @param l the Lead we are to update
564      * @exception AngError thrown when an app error occurs
565      */

566     public void updateLead(long campaignPK, Lead l)
567         throws RemoteException, AngError;
568
569     /**
570      * get all campaigns
571      * @param lastSyncDate a user's last sync date which limits the
572      * query or null if no limit
573      * @return an ArrayList of campaigns
574      * @exception AngError thrown when an app error occurs
575      */

576     public ArrayList getCampaigns(java.util.Date JavaDoc lastSyncDate)
577         throws RemoteException, AngError;
578
579     /**
580      * get all leads for a campaign
581      * @param campaignPK the campaign primary key to search with
582      * @return an ArrayList of campaign leads that were found
583      * @exception AngError thrown when an app error occurs
584      */

585     public ArrayList getCampaignLeads(long campaignPK)
586         throws RemoteException, AngError;
587
588     public ArrayList getCampaignLeads(java.util.Date JavaDoc dt)
589         throws RemoteException, AngError;
590
591     public ArrayList getGroupMembers(java.util.Date JavaDoc dt)
592         throws RemoteException, AngError;
593     /**
594      * delete a CustomerInventory
595      * @param ci the CustomerInventory we are to delete
596      * @exception AngError thrown when an app error occurs
597      */

598     public void deleteCustomerInventory(CustomerInventory ci)
599         throws RemoteException, AngError;
600
601     /**
602      * add a CustomerInventory
603      * @param ci the CustomerInventory we are adding
604      * @return the new CustomerInventory's primary key
605      * @exception AngError thrown when an app error occurs
606      */

607     public long addCustomerInventory(CustomerInventory ci)
608         throws RemoteException, AngError;
609
610     /**
611      * get CustomerInventory for a given customer
612      * @param custPK the Customer's PK we are searching with
613      * @return the list of CustomerInventory
614      * @exception AngError thrown when an app error occurs
615      */

616     public ArrayList getCustomerInventory(long custPK)
617         throws RemoteException, AngError;
618
619     /**
620      * upload the deletes from local to remote
621      * @param deletes an ArrayList of delete info
622      */

623      public void uploadDeletes(ArrayList deletes)
624         throws RemoteException, AngError;
625
626 }
627
Popular Tags