KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > exchange > items > calendar > model > Calendar


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package sync4j.exchange.items.calendar.model;
20
21
22 import java.util.logging.Logger JavaDoc;
23 import java.util.logging.Level JavaDoc;
24
25 import java.util.Date JavaDoc;
26
27 import sync4j.framework.logging.Sync4jLogger;
28
29 /**
30  * @author Fabio Maggi @ Funambol
31  *
32  * @version $Id: Calendar.java,v 1.15 2005/06/20 14:02:47 fabius Exp $
33  **/

34
35 public class Calendar
36 extends sync4j.foundation.pdi.event.Event {
37
38     //--------------------------------------------------------------- Constants
39

40
41     //------------------------------------------------------------ Private data
42

43     private String JavaDoc id = null ;
44
45     private String JavaDoc href = null ;
46
47     private Date JavaDoc lastUpdate = null ;
48     private char modificationStatus = ' ' ;
49
50     Logger JavaDoc log = Sync4jLogger.getLogger("source");
51
52
53     //------------------------------------------------------------ Constructors
54

55     /**
56      * Creates a Calendar
57      *
58      */

59     public Calendar () {
60
61     }
62
63     /**
64      * Creates a Calendar
65      *
66      *
67      * @param id client item id
68      *
69      */

70     public Calendar (String JavaDoc id) {
71
72         this.id = id ;
73
74     }
75
76     /**
77      * Creates a Calendar
78      *
79      *
80      * @param id client item id
81      * @param t client item timestamp
82      *
83      */

84     public Calendar (String JavaDoc id, Date JavaDoc t) {
85
86         this.id = id ;
87         this.lastUpdate = t ;
88
89     }
90
91     /**
92      * Creates a Calendar
93      *
94      *
95      * @param id
96      * @param status
97      *
98      */

99     public Calendar (String JavaDoc id, char status) {
100
101         this.id = id ;
102         this.modificationStatus = modificationStatus ;
103
104     }
105
106     /**
107      * Creates a Calendar
108      *
109      *
110      * @param id
111      * @param href
112      * @param status
113      * @param lastUpdate
114      *
115      */

116     public Calendar (String JavaDoc id ,
117                      String JavaDoc href ,
118                      char status ,
119                      Date JavaDoc lastUpdate) {
120
121         this.id = id ;
122         this.href = href ;
123         this.modificationStatus = status ;
124         this.lastUpdate = lastUpdate ;
125
126     }
127
128
129     //---------------------------------------------------------- Public methods
130

131     public String JavaDoc getId () {
132         return id;
133     }
134
135     public Date JavaDoc getLastUpdate () {
136         return lastUpdate;
137     }
138
139
140     public char getModificationStatus () {
141         return modificationStatus;
142     }
143
144     public String JavaDoc getHref () {
145         return href;
146     }
147
148     public void setId(String JavaDoc id) {
149         this.id = id;
150     }
151
152     public void setLastUpdate(Date JavaDoc lastUpdate) {
153         this.lastUpdate = lastUpdate;
154     }
155
156     public void setModificationStatus(char status) {
157         this.modificationStatus = status;
158     }
159
160     public void setHref(String JavaDoc href) {
161         this.href = href;
162     }
163
164 }
165
Popular Tags