KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > tools > testrecorder > shared > SessionBean


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18
19 package org.apache.beehive.netui.tools.testrecorder.shared;
20
21 import org.apache.beehive.netui.tools.testrecorder.shared.util.DateHelper;
22
23 import java.util.Calendar JavaDoc;
24 import java.text.ParseException JavaDoc;
25
26 /**
27  * User: ozzy
28  * Date: Jun 20, 2004
29  * Time: 10:23:02 AM
30  */

31 public class SessionBean {
32
33     protected String JavaDoc sessionName;
34     private String JavaDoc tester;
35     private Calendar JavaDoc startDate;
36     private Calendar JavaDoc endDate;
37     private String JavaDoc description;
38
39     public String JavaDoc getSessionName() {
40         return sessionName;
41     }
42
43     public String JavaDoc getTester() {
44         return tester;
45     }
46
47     public void setTester( String JavaDoc tester ) {
48         this.tester = tester;
49     }
50
51     protected Calendar JavaDoc getStartDate() {
52         return startDate;
53     }
54
55     public void setStartDate( Calendar JavaDoc startDate ) {
56         this.startDate = startDate;
57     }
58
59     public void setStartDate( String JavaDoc date ) throws ParseException JavaDoc {
60         startDate = DateHelper.getCalendarInstance(date);
61     }
62
63     public String JavaDoc getStartDateString() {
64         if ( getStartDate() == null ) {
65             return null;
66         }
67         return DateHelper.formatToString(getStartDate());
68     }
69
70     protected Calendar JavaDoc getEndDate() {
71         return endDate;
72     }
73
74     public void setEndDate( Calendar JavaDoc endDate ) {
75         this.endDate = endDate;
76     }
77
78     public void setEndDate( String JavaDoc date ) throws ParseException JavaDoc {
79         endDate = DateHelper.getCalendarInstance(date);
80     }
81
82     public String JavaDoc getEndDateString() {
83         if ( getEndDate() == null ) {
84             return null;
85         }
86         else return DateHelper.formatToString(getEndDate());
87     }
88
89     public String JavaDoc getDescription() {
90         return description;
91     }
92
93     public void setDescription( String JavaDoc description ) {
94         this.description = description;
95     }
96
97 }
98
Popular Tags