%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
net.sf.infrared.web.formbean.ConfigureFormBean |
|
|
1 | /* |
|
2 | * |
|
3 | * Copyright 2005 Tavant Technologies and Contributors |
|
4 | * |
|
5 | * Licensed under the Apache License, Version 2.0 (the "License") |
|
6 | * you may not use this file except in compliance with the License. |
|
7 | * You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
16 | * |
|
17 | * |
|
18 | * |
|
19 | * Original Author: prashant.nair (Tavant Technologies) |
|
20 | * |
|
21 | */ |
|
22 | package net.sf.infrared.web.formbean; |
|
23 | ||
24 | import java.text.SimpleDateFormat; |
|
25 | import java.util.Date; |
|
26 | import java.util.logging.Formatter; |
|
27 | ||
28 | import javax.servlet.http.HttpServletRequest; |
|
29 | ||
30 | import org.apache.struts.action.ActionErrors; |
|
31 | import org.apache.struts.action.ActionForm; |
|
32 | import org.apache.struts.action.ActionMapping; |
|
33 | ||
34 | public class ConfigureFormBean extends ActionForm { |
|
35 | ||
36 | 0 | private String dataFetch = "true"; |
37 | private String startDate; |
|
38 | private String endDate; |
|
39 | ||
40 | public ConfigureFormBean() { |
|
41 | 0 | super(); |
42 | ||
43 | 0 | SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
44 | 0 | startDate = sdf.format(new Date()); |
45 | 0 | endDate = startDate; |
46 | 0 | } |
47 | ||
48 | public boolean isLiveData() { |
|
49 | 0 | return "true".equalsIgnoreCase(dataFetch); |
50 | } |
|
51 | ||
52 | public String getDataFetch() { |
|
53 | 0 | return dataFetch; |
54 | } |
|
55 | ||
56 | public void setDataFetch(String typeOfData) { |
|
57 | 0 | this.dataFetch = typeOfData; |
58 | 0 | } |
59 | ||
60 | public String getEndDate() { |
|
61 | 0 | return endDate; |
62 | } |
|
63 | ||
64 | public void setEndDate(String endDate) { |
|
65 | 0 | this.endDate = endDate; |
66 | 0 | } |
67 | ||
68 | public String getStartDate() { |
|
69 | 0 | return startDate; |
70 | } |
|
71 | ||
72 | public void setStartDate(String startDate) { |
|
73 | 0 | this.startDate = startDate; |
74 | 0 | } |
75 | ||
76 | public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { |
|
77 | 0 | return super.validate(arg0, arg1); |
78 | } |
|
79 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |