1 /***
2 Copyright (C) 2005 The Java Community
3
4 This program is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free Software
6 Foundation; either version 2 of the License, or (at your option) any later
7 version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 Place, Suite 330, Boston, MA 02111-1307 USA.
16
17 */
18 package org.bejug.javacareers.jobs.service;
19
20 import java.util.List;
21
22 import org.bejug.javacareers.common.search.SearchCriteria;
23 import org.bejug.javacareers.jobs.model.JobOffer;
24 import org.bejug.javacareers.jobs.model.User;
25
26 /***
27 * Defines the "Business Facade" of the controller.
28 *
29 * @author Stephan Janssen (last modified by $Author: ge0ffrey $ )
30 * @version $Revision: 1.1 $ - $Date: 2005/08/26 07:58:27 $
31 */
32 public interface JobService {
33
34 /***
35 * Adds a job offer.
36 * @param offer A job offer.
37 */
38 void storeJobOffer(JobOffer offer);
39
40 /***
41 * delete a joboffer.
42 * @param offer the joboffer to delete
43 */
44 void deleteJobOffer(JobOffer offer);
45
46 /***
47 * deletes joboffers by url.
48 * @param url the url of joboffers to delete
49 * @return int number of jobs deleted
50 */
51
52 int deleteJobOffersByUrl(String url);
53 /***
54 * get a list of joboffers.
55 * @return a list containing all the joboffers
56 */
57 List getJobOffers();
58
59
60 /***
61 * gets a joboffer by id.
62 * @param id the id of the joboffer
63 * @return the wanted joboffer
64 */
65 JobOffer getJobOffer(Integer id);
66
67 /***
68 * gets a joboffer by searchCriteria.
69 * @param searchCriteria the searchCriteria
70 * @return the wanted joboffers
71 * @throws IllegalArgumentException if an error
72 */
73 List getJobOffers(SearchCriteria searchCriteria) throws IllegalArgumentException;
74
75
76
77 /***
78 * @return an int indicating the number of jobs stored in the database
79 */
80 int getJobOfferCount();
81
82
83 /***
84 * @param currentUser the user working with the application.
85 * @return an int indicating the number of jobs posted by the current user
86 */
87 int getCurrentUserJobOfferCount(User currentUser);
88
89 }
90 /***
91 * $Log: JobService.java,v $
92 * Revision 1.1 2005/08/26 07:58:27 ge0ffrey
93 * split up the sources in service, serviceimpl and webclient
94 *
95 * Revision 1.13 2005/08/12 08:33:09 bme_jcs
96 * moved profile-methods from jobservice to adminservice
97 *
98 * Revision 1.12 2005/08/10 09:04:49 bavo_jcs
99 * Optimized imports according to checkstyle
100 *
101 * Revision 1.11 2005/08/09 12:59:56 bavo_jcs
102 * Optimized imports
103 *
104 * Revision 1.10 2005/08/08 09:38:21 bme_jcs
105 * resolved checkstyle errors
106 *
107 * Revision 1.9 2005/08/05 07:50:32 psong09
108 * added named query to Offer
109 *
110 * Revision 1.8 2005/08/03 13:16:03 bme_jcs
111 * getDao's removed and storeObject renamed to store
112 *
113 * Revision 1.7 2005/06/21 12:45:32 bavo_jcs
114 * added number of joboffers
115 *
116 * Revision 1.6 2005/06/21 10:04:54 bavo_jcs
117 * added number of joboffers
118 *
119 * Revision 1.5 2005/06/14 13:40:04 schauwvliege
120 * Renamed add to store
121 *
122 * Revision 1.4 2005/06/14 12:05:52 schauwvliege
123 * CheckStyle and fixing tests
124 *
125 * Revision 1.3 2005/06/10 15:37:34 bavo_jcs
126 * int returned on delete
127 *
128 * Revision 1.2 2005/06/09 08:18:52 bejug_cc
129 * Fix initial import
130 *
131 * Revision 1.11 2005/05/31 07:10:32 bme
132 * added count-methods
133 *
134 * Revision 1.10 2005/05/25 15:38:45 ssc
135 * Optimized tests for search criteria
136 *
137 * Revision 1.9 2005/05/13 14:54:09 ssc
138 * added delete profile
139 *
140 * Revision 1.8 2005/05/12 08:23:55 ssc
141 * Checkstyle errors
142 *
143 * Revision 1.7 2005/05/10 13:31:52 bbr
144 * Added deleteOffersByUrl()
145 *
146 * Revision 1.6 2005/05/09 14:54:45 ssc
147 * checkstyle
148 *
149 * Revision 1.5 2005/04/29 18:17:34 sja
150 * General cleanup (naming conv., javadoc and CVS tags)
151 *
152 * Revision 1.3 2005/04/29 12:16:17 bme
153 * first release
154 *
155 * Revision 1.1 2005/04/19 11:51:22 PSONG09
156 * First release
157 *
158 * Revision 1.3 2005/04/18 19:00:05 sja
159 * Added javadoc.
160 *
161 * Revision 1.2 2005/04/18 18:38:58 sja
162 * Added extra CVS tags.
163 *
164 * Revision 1.1 2005/04/15 19:50:55 sja
165 * First Release
166 *
167 */