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  
19  package org.bejug.javacareers.jobs.view.jsf.model;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  
24  import javax.faces.model.ArrayDataModel;
25  import javax.faces.model.DataModel;
26  
27  import org.bejug.javacareers.jobs.view.jsf.util.JobOfferSorter;
28  
29  /***
30   * The Job offer JSf data.
31   *
32   * @author Peter Symoens (last modified by $Author: schauwvliege $)
33   * @version $Revision: 1.7 $ - $Date: 2005/09/13 08:11:06 $
34   */
35  public class JobOfferData {
36  
37      /***
38       * The filtered job offer model.
39       */
40      private DataModel filterModel;
41  
42      /***
43       * The job offer list.
44       */
45      private static List jobOffers = new ArrayList();
46  
47      /***
48       * @param jobOfferList
49       *            The jobOffers to set filled by the jobAction.
50       */
51      public static void setJobOffers(List jobOfferList) {
52          jobOffers = jobOfferList;
53      }
54  
55     /***
56      *
57      * @return jobOffers Returns the joboffer list.
58      */
59      public static List getJobOfferList(){
60          return jobOffers;
61      }
62  
63      /***
64       *
65       * @return Returns the dataModel
66       */
67      public DataModel getJobOffers() {
68          ArrayDataModel model = new ArrayDataModel(jobOffers.toArray());
69  
70          if (filterModel == null) {
71              filterModel = new JobOfferSorter(model);
72          }
73  
74          return filterModel;
75      }
76  }
77  /***
78   * $Log: JobOfferData.java,v $
79   * Revision 1.7  2005/09/13 08:11:06  schauwvliege
80   * organize imports
81   *
82   * Revision 1.6  2005/08/23 07:57:11  schauwvliege
83   * added some comment
84   *
85   * Revision 1.5  2005/08/19 13:29:53  bme_jcs
86   * checkstyle errors resolved
87   *
88   * Revision 1.4  2005/08/16 08:53:07  psong09
89   * Added delete job functionality
90   *
91   * Revision 1.3  2005/08/10 09:04:49  bavo_jcs
92   * Optimized imports according to checkstyle
93   *
94   * Revision 1.2  2005/06/09 08:18:53  bejug_cc
95   * Fix initial import
96   *
97   * Revision 1.14  2005/06/05 09:13:50  sja
98   * Removed logger.
99   *
100  * Revision 1.13  2005/05/23 15:11:53  PSONG09
101  * integration pdf indexing update
102  *
103  * Revision 1.12  2005/05/19 09:04:48  PSONG09
104  * modified jobsearch result table + CSS
105  *
106  * Revision 1.11  2005/05/18 15:14:07  PSONG09
107  * re-added logger
108  *
109  * Revision 1.10  2005/05/12 08:23:55  ssc
110  * Checkstyle errors
111  *
112  * Revision 1.9  2005/05/10 11:06:43  PSONG09
113  * update actions
114  *
115  * Revision 1.8  2005/05/07 09:11:57  sja
116  * Added javadoc.
117  *
118  * Revision 1.7  2005/05/04 15:26:17  PSONG09
119  * Data are now loaded by actionListener
120  *
121  * Revision 1.6 2005/05/03 15:00:40 PSONG09
122  * outcommented logging
123  *
124  * Revision 1.5 2005/05/01 15:07:48 sja Addded filterModel != null check
125  *
126  * Revision 1.4 2005/04/29 18:17:34 sja General cleanup (naming conv., javadoc
127  * and CVS tags)
128  *
129  */