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.project.properties;
20
21 import java.io.File;
22
23 import javax.servlet.ServletContext;
24
25 import org.springframework.web.context.ServletContextAware;
26
27
28 /***
29 * Class that holds the project properties which can be accessed as a bean
30 * by JSF.
31 *
32 * @author Stephan Janssen (Last modified by $Author: shally $)
33 * @version $Revision: 1.4 $ - $Date: 2005/12/20 15:36:46 $
34 */
35 public class JavaCareersConfig implements ServletContextAware {
36
37 /***
38 * The JavaCareers version number.
39 */
40 private String version;
41
42 /***
43 * The JavaCareers build date.
44 */
45 private String buildDate;
46
47 /***
48 * The JavaCareers production mode boolean.
49 */
50 private boolean productionMode;
51
52 /***
53 * The JavaCareers default url.
54 */
55 private String url;
56
57 /***
58 * The JavaCareers PDF upload path.
59 */
60 private String uploadPath;
61
62 /***
63 * The JavaCareers mailer email address.
64 */
65 private String mailerEmail;
66
67 /***
68 * The Url mailed to users when new jobs have been posted.
69 */
70 private String jobsPageUrl;
71
72 /***
73 * The Url for jobs details (used by RSS).
74 */
75 private String jobPageUrl;
76 /***
77 * Name of application
78 */
79 private String appname;
80
81 /***
82 * The default lines per page shown in a datatable
83 */
84 private String linesPerPage;
85
86
87 /***
88 * ServletContext
89 */
90 private ServletContext servletContext;
91
92 /***
93 * @return Returns the jobsPageUrl.
94 */
95 public String getJobsPageUrl() {
96 return jobsPageUrl;
97 }
98
99 /***
100 * @param jobsPageUrl The jobsPageUrl to set.
101 */
102 public void setJobsPageUrl(String jobsPageUrl) {
103 this.jobsPageUrl = jobsPageUrl;
104 }
105
106
107 /***
108 * @return version
109 */
110 public String getVersion() {
111 return version;
112 }
113
114 /***
115 * @param version String
116 */
117 public void setVersion(String version) {
118 this.version = version;
119 }
120
121 /***
122 * @return buildDate
123 */
124 public String getBuildDate() {
125 return buildDate;
126 }
127
128 /***
129 * @param buildDate String
130 */
131 public void setBuildDate(String buildDate) {
132 this.buildDate = buildDate;
133 }
134
135 /***
136 * @return productionMode
137 */
138 public boolean isProductionMode() {
139 return productionMode;
140 }
141
142 /***
143 * @param productionMode boolean
144 */
145 public void setProductionMode(boolean productionMode) {
146 this.productionMode = productionMode;
147 }
148
149 /***
150 * @return url
151 */
152 public String getUrl() {
153 return url;
154 }
155
156 /***
157 * @param url String
158 */
159 public void setUrl(String url) {
160 this.url = url;
161 }
162
163 /***
164 * @return uploadPath
165 */
166 public String getUploadPath() {
167 return uploadPath;
168 }
169
170 /***
171 * @param uploadPath String
172 */
173 public void setUploadPath(String uploadPath) {
174 this.uploadPath = uploadPath;
175 }
176
177 /***
178 * @return Returns the mailerEmail.
179 */
180 public String getMailerEmail() {
181 return mailerEmail;
182 }
183
184 /***
185 * @param mailerEmail The mailerEmail to set.
186 */
187 public void setMailerEmail(String mailerEmail) {
188 this.mailerEmail = mailerEmail;
189 }
190
191 /***
192 * @return WebPathUrl
193 */
194 public String getWebPathUrl() {
195 if (servletContext != null) {
196 return servletContext.getRealPath("");
197 }
198 return new File("").getAbsolutePath();
199 }
200
201
202 /***
203 * @return the applicateion name
204 */
205 public String getAppname() {
206 return appname;
207 }
208
209 /***
210 * @param appname String
211 */
212 public void setAppname(String appname) {
213 this.appname = appname;
214 }
215
216 /***
217 * @see org.springframework.web.context.ServletContextAware#setServletContext(javax.servlet.ServletContext)
218 * @param servletContext is the servletContext
219 */
220 public void setServletContext(ServletContext servletContext) {
221 this.servletContext = servletContext;
222 }
223
224 /***
225 * @return jobPageUrl
226 */
227 public String getJobPageUrl() {
228 return jobPageUrl;
229 }
230
231 /***
232 * @param jobPageUrl String
233 */
234 public void setJobPageUrl(String jobPageUrl) {
235 this.jobPageUrl = jobPageUrl;
236 }
237
238 /***
239 *
240 * @return the linesPerPage.
241 */
242 public String getLinesPerPage() {
243 return linesPerPage;
244 }
245
246 /***
247 *
248 * @param linesPerPage The linesPerPage to set.
249 */
250
251 public void setLinesPerPage(String linesPerPage) {
252 this.linesPerPage = linesPerPage;
253 }
254 }
255
256 /***
257 * $Log: JavaCareersConfig.java,v $
258 * Revision 1.4 2005/12/20 15:36:46 shally
259 * CheckStyle and PMD changes.
260 *
261 * Revision 1.3 2005/12/09 10:46:56 shally
262 * Opkuis voor checkstyle en PMD
263 *
264 * Revision 1.2 2005/09/13 08:11:17 schauwvliege
265 * organize imports
266 *
267 * Revision 1.1 2005/08/26 07:58:31 ge0ffrey
268 * split up the sources in service, serviceimpl and webclient
269 *
270 * Revision 1.13 2005/08/24 12:32:13 psong09
271 * Added spinner component and renamed commentAction
272 *
273 * Revision 1.12 2005/08/10 09:04:52 bavo_jcs
274 * Optimized imports according to checkstyle
275 *
276 * Revision 1.11 2005/08/09 12:59:57 bavo_jcs
277 * Optimized imports
278 *
279 * Revision 1.10 2005/07/28 07:19:39 bavo_jcs
280 * URL path fix
281 *
282 * Revision 1.9 2005/07/26 10:55:13 psong09
283 * Added more user details in the display table of the resumes page and fixed the table header (was not rendered).
284 * Modified the url of the pdf's to fix a bug when deploying on Tomcat
285 * Modified ajax script to open the pdf in a new window.
286 *
287 * Revision 1.8 2005/07/08 07:43:06 psong09
288 * cleaned up cvs revision and author tags
289 *
290 *
291 * Revision 1.6 2005/06/27 13:18:26 ge0ffrey
292 * JAVACAREERS-182
293 *
294 * Revision 1.5 2005/06/17 12:01:17 schauwvliege
295 * CheckStyle/ PMD
296 *
297 * Revision 1.4 2005/06/16 13:46:47 bavo_jcs
298 * made jobs accessible through GET method URL
299 * adapted RSS file to use this
300 *
301 * Revision 1.3 2005/06/14 12:05:52 schauwvliege
302 * CheckStyle and fixing tests
303 *
304 * Revision 1.2 2005/06/09 08:18:54 bejug_cc
305 * Fix initial import
306 *
307 * Revision 1.4 2005/06/07 09:46:13 bbr
308 * job source, webpath, indexing
309 *
310 * Revision 1.3 2005/06/02 15:31:58 kva
311 * send correct url in jobs email
312 *
313 * Revision 1.2 2005/05/30 11:39:58 kva
314 * make sure properties follow our own conventions
315 *
316 * Revision 1.1 2005/05/28 14:23:15 sja
317 * Initial import.
318 *
319 */