Source Code Cross Referenced for FileDO.java in  » Groupware » ivatagroupware » com » ivata » groupware » business » drive » file » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Groupware » ivatagroupware » com.ivata.groupware.business.drive.file 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2001 - 2005 ivata limited.
003:         * All rights reserved.
004:         * -----------------------------------------------------------------------------
005:         * ivata groupware may be redistributed under the GNU General Public
006:         * License as published by the Free Software Foundation;
007:         * version 2 of the License.
008:         *
009:         * These programs are free software; you can redistribute them and/or
010:         * modify them under the terms of the GNU General Public License
011:         * as published by the Free Software Foundation; version 2 of the License.
012:         *
013:         * These programs are distributed in the hope that they will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016:         *
017:         * See the GNU General Public License in the file LICENSE.txt for more
018:         * details.
019:         *
020:         * If you would like a copy of the GNU General Public License write to
021:         *
022:         * Free Software Foundation, Inc.
023:         * 59 Temple Place - Suite 330
024:         * Boston, MA 02111-1307, USA.
025:         *
026:         *
027:         * To arrange commercial support and licensing, contact ivata at
028:         *                  http://www.ivata.com/contact.jsp
029:         * -----------------------------------------------------------------------------
030:         * $Log: FileDO.java,v $
031:         * Revision 1.3  2005/10/11 18:51:38  colinmacleod
032:         * Fixed some checkstyle and javadoc issues.
033:         *
034:         * Revision 1.2  2005/10/02 14:08:56  colinmacleod
035:         * Added/improved log4j logging.
036:         *
037:         * Revision 1.1  2005/09/14 15:16:01  colinmacleod
038:         * Moved from library to core as part of ivata cms restructuring.
039:         *
040:         * Revision 1.3  2005/04/10 20:10:07  colinmacleod
041:         * Added new themes.
042:         * Changed id type to String.
043:         * Changed i tag to em and b tag to strong.
044:         * Improved PicoContainerFactory with NanoContainer scripts.
045:         *
046:         * Revision 1.2  2005/04/09 17:20:00  colinmacleod
047:         * Changed copyright text to GPL v2 explicitly.
048:         *
049:         * Revision 1.1.1.1  2005/03/10 17:51:13  colinmacleod
050:         * Restructured ivata op around Hibernate/PicoContainer.
051:         * Renamed ivata groupware.
052:         *
053:         * Revision 1.5  2004/07/13 20:00:13  colinmacleod
054:         * Moved project to POJOs from EJBs.
055:         * Applied PicoContainer to services layer (replacing session EJBs).
056:         * Applied Hibernate to persistence layer (replacing entity EJBs).
057:         *
058:         * Revision 1.4  2004/03/21 21:16:26  colinmacleod
059:         * Shortened name to ivata op.
060:         *
061:         * Revision 1.3  2004/02/10 19:57:23  colinmacleod
062:         * Changed email address.
063:         *
064:         * Revision 1.2  2004/02/01 22:07:30  colinmacleod
065:         * Added full names to author tags
066:         *
067:         * Revision 1.1.1.1  2004/01/27 20:58:27  colinmacleod
068:         * Moved ivata op to sourceforge.
069:         *
070:         * Revision 1.2  2003/10/15 14:05:21  colin
071:         * fixing for XDoclet
072:         *
073:         * Revision 1.8  2003/05/13 08:07:27  peter
074:         * restructured hierarchy
075:         *
076:         * Revision 1.7  2003/02/24 19:03:09  colin
077:         * restructured file paths
078:         *
079:         * Revision 1.6  2003/02/04 17:43:45  colin
080:         * copyright notice
081:         *
082:         * Revision 1.5  2003/01/20 13:46:51  peter
083:         * comment added
084:         *
085:         * Revision 1.2  2003/01/13 16:48:16  peter
086:         * beans and DOs added to the model
087:         *
088:         * Revision 1.4  2003/01/09 17:14:12  peter
089:         * added path field
090:         *
091:         * Revision 1.3  2002/12/30 16:03:52  peter
092:         * added id field
093:         *
094:         * Revision 1.2  2002/12/23 13:36:16  peter
095:         * completed and commented version
096:         *
097:         * Revision 1.1  2002/12/20 17:49:25  peter
098:         * initial  versions added to CVS
099:         * -----------------------------------------------------------------------------
100:         */
101:        package com.ivata.groupware.business.drive.file;
102:
103:        import org.apache.log4j.Logger;
104:
105:        import com.ivata.groupware.container.persistence.BaseDO;
106:
107:        /**
108:         * <p>Encapsulates a single file, but doesn't
109:         * contain its
110:         * content. For content @link FileContentDO is used</p>
111:         *
112:         * @since 2002-12-20
113:         * @author Peter Illes
114:         * @version $Revision: 1.3 $
115:         */
116:        public class FileDO extends BaseDO {
117:            /**
118:             * Logger for this class.
119:             */
120:            private static final Logger logger = Logger.getLogger(FileDO.class);
121:
122:            /**
123:             * Serialization version (for <code>Serializable</code> interface).
124:             */
125:            private static final long serialVersionUID = 1L;
126:
127:            /**
128:             * <p>Comment used when working with new library attachments.</p>
129:             */
130:            private String comment;
131:
132:            /**
133:             * <p>Stores the mime-type text identifier of the content.</p>
134:             */
135:            private String mimeType;
136:
137:            /**
138:             * <p>The name of the file.</p>
139:             */
140:            private String name;
141:
142:            /**
143:             * <p>The size of this file in bytes.</p>
144:             */
145:            private Integer size;
146:
147:            /**
148:             * <p>Get the comment used when working with new library attachments.</p>
149:             * @return comment used when working with new library attachments.
150:             */
151:            public final String getComment() {
152:                if (logger.isDebugEnabled()) {
153:                    logger.debug("getComment() - start");
154:                }
155:
156:                if (logger.isDebugEnabled()) {
157:                    logger.debug("getComment() - end - return value = "
158:                            + comment);
159:                }
160:                return comment;
161:            }
162:
163:            /**
164:             * <p>Get the mime type of the file content.</p>
165:             * @return clear-text mime type of the file content.
166:             *
167:             * @roseuid 3E22C256019C
168:             */
169:            public final java.lang.String getMimeType() {
170:                if (logger.isDebugEnabled()) {
171:                    logger.debug("getMimeType() - start");
172:                }
173:
174:                if (logger.isDebugEnabled()) {
175:                    logger.debug("getMimeType() - end - return value = "
176:                            + mimeType);
177:                }
178:                return mimeType;
179:            }
180:
181:            /**
182:             * <p>Get the name of the file.</p>
183:             * @return The name of the file.
184:             */
185:            public final String getName() {
186:                if (logger.isDebugEnabled()) {
187:                    logger.debug("getName() - start");
188:                }
189:
190:                if (logger.isDebugEnabled()) {
191:                    logger.debug("getName() - end - return value = " + name);
192:                }
193:                return name;
194:            }
195:
196:            /**
197:             * <p>Get the size of the file in bytes.</p>
198:             * @return the size of the file in bytes.
199:             */
200:            public final Integer getSize() {
201:                if (logger.isDebugEnabled()) {
202:                    logger.debug("getSize() - start");
203:                }
204:
205:                if (logger.isDebugEnabled()) {
206:                    logger.debug("getSize() - end - return value = " + size);
207:                }
208:                return size;
209:            }
210:
211:            /**
212:             * <p>Get the comment used when working with new library attachments.</p>
213:             * @param commentParam The comment used when working with new library
214:             * attachments.
215:             */
216:            public final void setComment(final String commentParam) {
217:                if (logger.isDebugEnabled()) {
218:                    logger.debug("setComment(String comment = " + commentParam
219:                            + ") - start");
220:                }
221:
222:                this .comment = commentParam;
223:
224:                if (logger.isDebugEnabled()) {
225:                    logger.debug("setComment(String) - end");
226:                }
227:            }
228:
229:            /**
230:             * <p>sets the mime type of the file content.</p>
231:             * @param mimeTypeParam clear-text mime type identifier of the file
232:             * content.
233:             *
234:             * @roseuid 3E22C256019D
235:             */
236:            public final void setMimeType(final String mimeTypeParam) {
237:                if (logger.isDebugEnabled()) {
238:                    logger.debug("setMimeType(String mimeType = "
239:                            + mimeTypeParam + ") - start");
240:                }
241:
242:                this .mimeType = mimeTypeParam;
243:
244:                if (logger.isDebugEnabled()) {
245:                    logger.debug("setMimeType(String) - end");
246:                }
247:            }
248:
249:            /**
250:             * <p>Sets the file name field.</p>
251:             * @param nameParam new file name.
252:             *
253:             * @roseuid 3E22C256015E
254:             */
255:            public final void setName(final String nameParam) {
256:                if (logger.isDebugEnabled()) {
257:                    logger.debug("setName(String name = " + nameParam
258:                            + ") - start");
259:                }
260:
261:                this .name = nameParam;
262:
263:                if (logger.isDebugEnabled()) {
264:                    logger.debug("setName(String) - end");
265:                }
266:            }
267:
268:            /**
269:             * <p>Set the size of the file in bytes.</p>
270:             * @param sizeParam The size of the file in bytes.
271:             *
272:             * @roseuid 3E22C2560167
273:             */
274:            public final void setSize(final Integer sizeParam) {
275:                if (logger.isDebugEnabled()) {
276:                    logger.debug("setSize(Integer size = " + sizeParam
277:                            + ") - start");
278:                }
279:
280:                this .size = sizeParam;
281:
282:                if (logger.isDebugEnabled()) {
283:                    logger.debug("setSize(Integer) - end");
284:                }
285:            }
286:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.