View Javadoc

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.common.service;
19  
20  import org.bejug.javacareers.jobs.model.CommercialEducationOffer;
21  import org.bejug.javacareers.jobs.model.Item;
22  
23  import java.util.List;
24  
25  /***
26   * The ItemService is responsable for all manipulations on items(offers and 
27   * resumes).
28   * @author Bart Meyers (Last modified by $Author: shally $)
29   * @version $Revision: 1.10 $ - $Date: 2005/12/20 15:36:45 $
30   */
31  public interface ItemService {
32  
33  	/***
34  	 * gets the items.
35  	 * @return all items.
36  	 */
37  	List getItems();
38  	
39  	/***
40  	 * gets the item.
41  	 * @param id is the identity
42  	 * @return fount item.
43  	 */
44  	Item getItem( Integer id );
45  
46  	/***
47  	 * gets the items.
48  	 * @param itemType an integer indicating the type of item we want.
49  	 * @return a list containing the type of items we want. 
50  	 */
51  	List getItems(int itemType);
52  
53  	/***
54  	 * @return the total Itemcount.
55  	 */
56  	int getItemCount();
57  		
58  	/***
59  	 * @param itemType the type of items to count.
60  	 * @return an int containing the number of items.
61  	 */
62  	int getItemCount(int itemType);
63  	
64  	/***
65  	 * @return the total UnapprovedItemcount.
66  	 */
67  	int getUnApprovedItemCount();
68  	
69  	/***
70  	 * @param itemType is itemType
71  	 * @return the total UnapprovedItemcount.
72  	 */
73  	int getUnApprovedItemCount(int itemType);
74  	
75  	/***
76  	 * @return a list of unapproved items
77  	 */
78  	List getUnApprovedItems();
79  	
80  	/***
81       * List the items by type
82       * @param itemType of The javacareers Item class
83       * @return a list of unapproved javacareers items
84       */
85  	List getUnApprovedItems(int itemType);
86  	
87  	/***
88       * List the items by type
89       *
90       * @param clazz The javacareers Item class
91       * @return a list of unapproved javacareers items
92       */
93  	List getUnApprovedItems(Class clazz);
94  	
95  	/***
96  	 * deletes an item 
97  	 * @param item the item to delete
98  	 */
99  	void delete(Item item);
100 
101 	/***
102 	 * finds an item by id
103 	 * @param id an Integer indicating the id of the Item.
104 	 * @return the wanted Item.
105 	 */
106 	Item findById(Integer id);
107 
108     /***
109      * List the items by type
110      *
111      * @param clazz The javacareers Item class
112      * @return  The list of javacareers items
113      */
114     List getItems(Class clazz);
115     
116     /***
117 	 * Store an item;
118 	 * @param item Item.
119 	 */
120 	public void store(Item item) ;
121 
122     /***
123      *
124      * @param item is the item
125      */ 
126     public void store(CommercialEducationOffer item);
127 }
128 /***
129  * $Log: ItemService.java,v $
130  * Revision 1.10  2005/12/20 15:36:45  shally
131  * CheckStyle and PMD changes.
132  *
133  * Revision 1.9  2005/10/11 11:39:41  stephan_janssen
134  * Code cleanup.
135  *
136  * Revision 1.8  2005/09/19 16:15:26  schauwvliege
137  * Introduction of Approve items
138  *
139  * Revision 1.7  2005/09/13 08:10:55  schauwvliege
140  * organize imports
141  *
142  * Revision 1.6  2005/09/09 16:45:24  bavo_jcs
143  * Added CommercialEducationOffer
144  *
145  * Revision 1.5  2005/09/06 15:33:31  bavo_jcs
146  * Added PostInterview
147  *
148  * Revision 1.4  2005/09/06 14:53:03  schauwvliege
149  * added add item
150  *
151  * Revision 1.3  2005/08/30 13:07:48  psong09
152  * renamed author: psong09
153  *
154  * Revision 1.2  2005/08/26 12:15:15  bme_jcs
155  * Javacareers issue 303
156  *
157  * Revision 1.1  2005/08/26 07:58:25  ge0ffrey
158  * split up the sources in service, serviceimpl and webclient
159  *
160  * Revision 1.3  2005/08/24 16:30:00  schauwvliege
161  * introduction of mixed list of all items
162  *
163  * Revision 1.2  2005/08/23 13:04:51  bme_jcs
164  * added count-queries
165  *
166  * Revision 1.1  2005/08/23 09:32:04  bme_jcs
167  * introduction of ItemService-classes
168  *
169  */