KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > drive > file > FileRevisionDO


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: FileRevisionDO.java,v $
31  * Revision 1.2 2005/04/09 17:19:43 colinmacleod
32  * Changed copyright text to GPL v2 explicitly.
33  *
34  * Revision 1.1.1.1 2005/03/10 17:51:52 colinmacleod
35  * Restructured ivata op around Hibernate/PicoContainer.
36  * Renamed ivata groupware.
37  *
38  * Revision 1.5 2004/07/13 20:00:13 colinmacleod
39  * Moved project to POJOs from EJBs.
40  * Applied PicoContainer to services layer (replacing session EJBs).
41  * Applied Hibernate to persistence layer (replacing entity EJBs).
42  *
43  * Revision 1.4 2004/03/21 21:16:26 colinmacleod
44  * Shortened name to ivata op.
45  *
46  * Revision 1.3 2004/02/10 19:57:23 colinmacleod
47  * Changed email address.
48  *
49  * Revision 1.2 2004/02/01 22:07:30 colinmacleod
50  * Added full names to author tags
51  *
52  * Revision 1.1.1.1 2004/01/27 20:58:27 colinmacleod
53  * Moved ivata op to sourceforge.
54  *
55  * Revision 1.2 2003/10/15 14:05:21 colin
56  * fixing for XDoclet
57  *
58  * Revision 1.6 2003/08/14 08:11:17 peter
59  * move to no path in db
60  *
61  * Revision 1.4 2003/02/24 19:03:09 colin
62  * restructured file paths
63  *
64  * Revision 1.3 2003/02/04 17:43:46 colin
65  * copyright notice
66  *
67  * Revision 1.2 2003/01/07 08:51:08 peter
68  * getFileRevision method brought to life
69  *
70  * Revision 1.1 2002/12/30 16:03:33 peter
71  * added to cvs
72  * -----------------------------------------------------------------------------
73  */

74 package com.ivata.groupware.business.drive.file;
75
76 import java.io.IOException JavaDoc;
77 import java.io.ObjectInputStream JavaDoc;
78 import java.io.ObjectOutputStream JavaDoc;
79 import java.io.Serializable JavaDoc;
80
81
82 /**
83  * <p>Encapsulates a revision of a file in the virtual drive</p>
84  * @since 2002-12-30
85  * @author Peter Illes
86  * @version $Revision: 1.2 $
87  */

88 public class FileRevisionDO implements Serializable JavaDoc {
89     /**
90      * <p>Stores the description (comment) of the revision.</p>
91      *
92      */

93     private String JavaDoc comment;
94
95     /**
96      * <p>the revision 'code'</p>
97      *
98      */

99     private String JavaDoc revision;
100
101     /**
102      * <p>Stores the name of the user who submitted this revision.
103      * </p>
104      *
105      */

106     private String JavaDoc userName;
107
108     /**
109      * <p>Stores the date and time when this revision was made</p>
110      */

111     private java.util.Date JavaDoc revised;
112
113     /**
114      * <p>Serialize the object from the input stream provided.</p>
115      *
116      * @param ois the input stream to serialize the object from
117      * @throws IOException thrown by
118      * <code>ObjectInputStream.defaultReadObject()</code>.
119      * @throws ClassNotFoundException thrown by
120      * <code>ObjectInputStream.defaultReadObject()</code>.
121      *
122      * @roseuid 3E22C2570157
123      */

124     private void readObject(final ObjectInputStream JavaDoc ois)
125         throws ClassNotFoundException JavaDoc, IOException JavaDoc {
126         ois.defaultReadObject();
127     }
128
129     /**
130      * <p>Serialize the object to the output stream provided.</p>
131      *
132      * @param oos the output stream to serialize the object to
133      * @throws IOException thrown by
134      * <code>ObjectOutputStream.defaultWriteObject()</code>
135      *
136      * @roseuid 3E22C2570187
137      */

138     private void writeObject(final ObjectOutputStream JavaDoc oos) throws IOException JavaDoc {
139         oos.defaultWriteObject();
140     }
141
142     /**
143      * <p>sets the comment field</p>
144      * @param comment the descriptive text of this revision
145      *
146      * @roseuid 3E22C2570189
147      */

148     public final void setComment(final String JavaDoc comment) {
149         this.comment = comment;
150     }
151
152     /**
153      * <p>gets the comment field</p>
154      * @return the descriptive text of this revision
155      *
156      * @roseuid 3E22C257018B
157      */

158     public final String JavaDoc getComment() {
159         return comment;
160     }
161
162     /**
163      * <p>sets the revision number (code) of this revision</p>
164      * @param headRevision the number of the last revision for this file
165      *
166      * @roseuid 3E22C257018C
167      */

168     public final void setRevision(final String JavaDoc revision) {
169         this.revision = revision;
170     }
171
172     /**
173      * <p>sets the head revision number - the most recent CVS revision
174      * number
175      * for this file</p>
176      * @return the code of the last CVS revision for this file
177      *
178      * @roseuid 3E22C257018E
179      */

180     public final String JavaDoc getRevision() {
181         return revision;
182     }
183
184     /**
185      * <p>getter for the date and time the file was modified to this
186      * revision</p>
187      * @return the date of this revision
188      *
189      * @roseuid 3E22C257018F
190      */

191     public final java.util.Date JavaDoc getRevised() {
192         return revised;
193     }
194
195     /**
196      * <p>setter for the date and time the file was revised</p>
197      * @param modified the date of the revision
198      *
199      * @roseuid 3E22C2570190
200      */

201     public final void setRevised(final java.util.Date JavaDoc revised) {
202         this.revised = revised;
203     }
204
205     /**
206      * <p>getter of the username of the user who submitted this
207      * revision.<p>
208      * @return the name of the user who submitted this revision.
209      *
210      * @roseuid 3E22C2570192
211      */

212     public final String JavaDoc getUserName() {
213         return userName;
214     }
215
216     /**
217      * <p>sets the username of the user who submitted this revision.<p>
218      * @param userName the userName of the user who submitted this
219      * revision
220      *
221      * @roseuid 3E22C25701C2
222      */

223     public final void setUserName(final String JavaDoc userName) {
224         this.userName = userName;
225     }
226 }
227
Popular Tags