KickJava   Java API By Example, From Geeks To Geeks.

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


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: DriveFileDO.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.3 2003/08/14 08:11:17 peter
59  * move to no path in db
60  *
61  * Revision 1.2 2003/05/13 15:39:50 jano
62  * fixing *DOs
63  *
64  * Revision 1.1 2003/05/13 08:05:55 peter
65  * added to cvs
66  * -----------------------------------------------------------------------------
67  */

68 package com.ivata.groupware.business.drive.file;
69
70 import com.ivata.groupware.business.drive.directory.DirectoryDO;
71
72
73 /**
74  * <p>Encapsulates a single file of the drive, but doesn't
75  * contain its
76  * content. For content @link FileContentDO is used</p>
77  *
78  * @since 2003-04-10
79  * @author Peter Illes
80  * @version $Revision: 1.2 $
81  */

82 public class DriveFileDO extends FileDO {
83     /**
84      * <p>The parent directory</p>
85      */

86     private DirectoryDO directory;
87
88     /**
89      * <p>The most recent revision of this file.</p>
90      */

91     private FileRevisionDO headRevision;
92
93     /**
94      * </p>the path (directory) of the file</p>
95      */

96     private String JavaDoc path;
97
98     /**
99      * <p>The parent directory</p>
100      *
101      * @return the parent directory
102      * @hibernate.many-to-one
103      */

104     public final DirectoryDO getDirectory() {
105         return directory;
106     }
107
108     /**
109      * <p>Get the head revision - the most recent CVS revision info
110      * for this file</p>
111      *
112      * @return the last CVS revision info for this file
113      * @hibernate.many-to-one
114      */

115     public FileRevisionDO getHeadRevision() {
116         return this.headRevision;
117     }
118
119     /**
120      * <p>Get the path of the file</p>
121      *
122      * @return the path of the file
123      * @hibernate.property
124      */

125     public final String JavaDoc getPath() {
126         return this.path;
127     }
128
129     /**
130      * <p>The parent directory</p>
131      *
132      * @param directory the parent directory
133      */

134     public final void setDirectory(final DirectoryDO directory) {
135         this.directory = directory;
136     }
137
138     /**
139      * <p>Get the head revision - the most recent CVS revision info
140      * for this file</p>
141      *
142      * @param headRevision the last CVS revision info for this file
143      */

144     public final void setHeadRevision(final FileRevisionDO headRevision) {
145         this.headRevision = headRevision;
146     }
147
148     /**
149      * <p>Set the path of the file.</p>
150      *
151      * @param path the file path (directory)
152      */

153     public final void setPath(final String JavaDoc path) {
154         this.path = path;
155     }
156 }
157
Popular Tags