KickJava   Java API By Example, From Geeks To Geeks.

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


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: FileDO.java,v $
31  * Revision 1.3 2005/04/10 20:10:07 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:20:00 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:51:13 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.5 2004/07/13 20:00:13 colinmacleod
45  * Moved project to POJOs from EJBs.
46  * Applied PicoContainer to services layer (replacing session EJBs).
47  * Applied Hibernate to persistence layer (replacing entity EJBs).
48  *
49  * Revision 1.4 2004/03/21 21:16:26 colinmacleod
50  * Shortened name to ivata op.
51  *
52  * Revision 1.3 2004/02/10 19:57:23 colinmacleod
53  * Changed email address.
54  *
55  * Revision 1.2 2004/02/01 22:07:30 colinmacleod
56  * Added full names to author tags
57  *
58  * Revision 1.1.1.1 2004/01/27 20:58:27 colinmacleod
59  * Moved ivata op to sourceforge.
60  *
61  * Revision 1.2 2003/10/15 14:05:21 colin
62  * fixing for XDoclet
63  *
64  * Revision 1.8 2003/05/13 08:07:27 peter
65  * restructured hierarchy
66  *
67  * Revision 1.7 2003/02/24 19:03:09 colin
68  * restructured file paths
69  *
70  * Revision 1.6 2003/02/04 17:43:45 colin
71  * copyright notice
72  *
73  * Revision 1.5 2003/01/20 13:46:51 peter
74  * comment added
75  *
76  * Revision 1.2 2003/01/13 16:48:16 peter
77  * beans and DOs added to the model
78  *
79  * Revision 1.4 2003/01/09 17:14:12 peter
80  * added path field
81  *
82  * Revision 1.3 2002/12/30 16:03:52 peter
83  * added id field
84  *
85  * Revision 1.2 2002/12/23 13:36:16 peter
86  * completed and commented version
87  *
88  * Revision 1.1 2002/12/20 17:49:25 peter
89  * initial versions added to CVS
90  * -----------------------------------------------------------------------------
91  */

92 package com.ivata.groupware.business.drive.file;
93
94 import com.ivata.groupware.container.persistence.BaseDO;
95
96
97 /**
98  * <p>Encapsulates a single file, but doesn't
99  * contain its
100  * content. For content @link FileContentDO is used</p>
101  *
102  * @since 2002-12-20
103  * @author Peter Illes
104  * @version $Revision: 1.3 $
105  */

106 public class FileDO extends BaseDO {
107
108     /**
109      * <p>Comment used when working with new library attachments.</p>
110      */

111     private String JavaDoc comment;
112
113     /**
114      * <p>Stores the mime-type text identifier of the content.</p>
115      */

116     private String JavaDoc mimeType;
117
118     /**
119      * </p>The name of the file.</p>
120      */

121     private String JavaDoc name;
122
123     /**
124      * <p>The size of this file in bytes</p>
125      */

126     private Integer JavaDoc size;
127
128     /**
129      * <p>comment used when working with new library attachments</p>
130      * @return comment
131      * @roseuid 3EBFBE2A0122
132      */

133     public final String JavaDoc getComment() {
134         return comment;
135     }
136
137     /**
138      * <p>Get the mime type of the file content.</p>
139      * @return clear-text mime type of the file content.
140      *
141      * @roseuid 3E22C256019C
142      */

143     public final java.lang.String JavaDoc getMimeType() {
144         return mimeType;
145     }
146
147     /**
148      * <p>gets the fileName field</p>
149      * @return fileName the filename
150      *
151      * @roseuid 3E22C2560160
152      */

153     public final String JavaDoc getName() {
154         return name;
155     }
156
157     /**
158      * <p>getter for size field - the size of the file in bytes</p>
159      * @return the size of the file in bytes
160      *
161      * @roseuid 3E22C256019B
162      */

163     public final Integer JavaDoc getSize() {
164         return size;
165     }
166
167     /**
168      * <p>comment used when working with new library attachments</p>
169      * @param comment
170      * @roseuid 3EBFBE390118
171      */

172     public final void setComment(final String JavaDoc comment) {
173         this.comment = comment;
174     }
175
176     /**
177      * <p>sets the mime type of the file content.</p>
178      * @param mimeType clear-text mime type identifier of the file
179      * content.
180      *
181      * @roseuid 3E22C256019D
182      */

183     public final void setMimeType(final String JavaDoc mimeType) {
184         this.mimeType = mimeType;
185     }
186
187     /**
188      * <p>Sets the file name field.</p>
189      * @param name new file name.
190      *
191      * @roseuid 3E22C256015E
192      */

193     public final void setName(final String JavaDoc name) {
194         this.name = name;
195     }
196
197     /**
198      * <p>setter for size field - the size of the file in bytes</p>
199      * @param size the size of the file
200      *
201      * @roseuid 3E22C2560167
202      */

203     public final void setSize(final Integer JavaDoc size) {
204         this.size = size;
205     }
206 }
207
Popular Tags