Source Code Cross Referenced for I_CmsHistoryResource.java in  » Content-Management-System » opencms » org » opencms » file » history » 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 » Content Management System » opencms » org.opencms.file.history 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/file/history/I_CmsHistoryResource.java,v $
003:         * Date   : $Date: 2008-02-27 12:05:25 $
004:         * Version: $Revision: 1.4 $
005:         *
006:         * This library is part of OpenCms -
007:         * the Open Source Content Management System
008:         *
009:         * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010:         *
011:         * This library is free software; you can redistribute it and/or
012:         * modify it under the terms of the GNU Lesser General Public
013:         * License as published by the Free Software Foundation; either
014:         * version 2.1 of the License, or (at your option) any later version.
015:         *
016:         * This library is distributed in the hope that it will be useful,
017:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
018:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
019:         * Lesser General Public License for more details.
020:         *
021:         * For further information about Alkacon Software GmbH, please see the
022:         * company website: http://www.alkacon.com
023:         *
024:         * For further information about OpenCms, please see the
025:         * project website: http://www.opencms.org
026:         *
027:         * You should have received a copy of the GNU Lesser General Public
028:         * License along with this library; if not, write to the Free Software
029:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
030:         */
031:
032:        package org.opencms.file.history;
033:
034:        import org.opencms.db.CmsResourceState;
035:        import org.opencms.util.CmsUUID;
036:
037:        import java.io.Serializable;
038:
039:        /**
040:         * A historical version of a resource in the OpenCms VFS resource history.<p>
041:         *
042:         * History resources are resources that contain additional information 
043:         * used to describe the historical state.<p>
044:         * 
045:         * The historical resource object extends the resource object since it be 
046:         * an history for a file as well as for a folder.<p>
047:         * 
048:         * History resources contain the names of the users that created or last 
049:         * modified the resource as string obejcts because a user id might have been 
050:         * deleted.<p>
051:         *
052:         * @author Michael Moossen
053:         * 
054:         * @version $Revision: 1.4 $
055:         * 
056:         * @since 6.9.1
057:         */
058:        public interface I_CmsHistoryResource extends Cloneable, Serializable,
059:                Comparable {
060:
061:            /**
062:             * Returns the history id of this historical resource.<p>
063:             *
064:             * @return the history id of this historical resource
065:             * 
066:             * @deprecated this field has been removed
067:             */
068:            CmsUUID getBackupId();
069:
070:            /**
071:             * Returns the user name of the creator of this historical resource.<p>
072:             *
073:             * @return the user name of the creator of this historical resource
074:             * 
075:             * @deprecated use {#getUserCreated()} instead
076:             *             now the {@link org.opencms.file.CmsObject#readUser(CmsUUID)} 
077:             *             also returns historical users
078:             */
079:            String getCreatedByName();
080:
081:            /**
082:             * Returns the date of the last modification of the content of this resource.<p>
083:             *
084:             * @return the date of the last modification of the content of this resource
085:             */
086:            long getDateContent();
087:
088:            /**
089:             * Returns the date of the creation of this resource.<p>
090:             *
091:             * @return the date of the creation of this resource
092:             */
093:            long getDateCreated();
094:
095:            /**
096:             * Returns the expiration date this resource.<p>
097:             *
098:             * @return the expiration date of this resource
099:             */
100:            long getDateExpired();
101:
102:            /**
103:             * Returns the date of the last modification of this resource.<p>
104:             *
105:             * @return the date of the last modification of this resource
106:             */
107:            long getDateLastModified();
108:
109:            /**
110:             * Returns the release date this resource.<p>
111:             *
112:             * @return the release date of this resource
113:             */
114:            long getDateReleased();
115:
116:            /**
117:             * Returns the flags of this resource.<p>
118:             *
119:             * @return the flags of this resource
120:             */
121:            int getFlags();
122:
123:            /**
124:             * Returns the name of the user who last changed this historical resource.<p>
125:             *
126:             * @return the name of the user who last changed this historical resource
127:             * 
128:             * @deprecated use {#getUserLastModified()} instead
129:             *             with {@link org.opencms.security.CmsPrincipal#readPrincipalIncludingHistory(org.opencms.file.CmsObject, CmsUUID)} 
130:             */
131:            String getLastModifiedByName();
132:
133:            /**
134:             * Returns the length of the resource.<p>
135:             *
136:             * If the resource is a file, then this is the byte size of the file content.
137:             * If the resource is a folder, then the size is always -1.<p>
138:             *
139:             * @return the length of the content
140:             */
141:            int getLength();
142:
143:            /**
144:             * Returns the name of this resource, e.g. <code>index.html</code>.<p>
145:             *
146:             * @return the name of this resource
147:             */
148:            String getName();
149:
150:            /**
151:             * Returns the structure id of the parent resource.<p>
152:             *
153:             * @return the structure id of the parent resource
154:             */
155:            CmsUUID getParentId();
156:
157:            /**
158:             * Returns the id of the project where the resource has been last modified.<p>
159:             *
160:             * @return the id of the project where the resource has been last modified, or <code>null</code>
161:             */
162:            CmsUUID getProjectLastModified();
163:
164:            /**
165:             * Returns the publish tag of this historical resource.<p>
166:             *
167:             * @return the publish tag of this historical resource
168:             */
169:            int getPublishTag();
170:
171:            /**
172:             * Returns the publish tag of this historical resource.<p>
173:             *
174:             * @return the publish tag of this historical resource
175:             * 
176:             * @deprecated use {@link #getPublishTag()} instead
177:             */
178:            int getPublishTagId();
179:
180:            /**
181:             * Returns the id of the resource database entry of this resource.<p>
182:             *
183:             * @return the id of the resource database entry
184:             */
185:            CmsUUID getResourceId();
186:
187:            /**
188:             * Returns the version number of the resource part for this historical resource.<p>
189:             *
190:             * @return the version number of the resource part for this historical resource
191:             */
192:            int getResourceVersion();
193:
194:            /**
195:             * Returns the name of a resource with it's full path from the root folder 
196:             * including the current site root, 
197:             * for example <code>/sites/default/myfolder/index.html</code>.<p>
198:             *
199:             * @return the name of a resource with it's full path from the root folder 
200:             *      including the current site root
201:             */
202:            String getRootPath();
203:
204:            /**
205:             * Returns the number of siblings of the resource, also counting this resource.<p>
206:             * 
207:             * If a resource has no sibling, the total sibling count for this resource is <code>1</code>, 
208:             * if a resource has <code>n</code> siblings, the sibling count is <code>n + 1</code>.<p> 
209:             * 
210:             * @return the number of siblings
211:             */
212:            int getSiblingCount();
213:
214:            /**
215:             * Returns the state of this resource.<p>
216:             *
217:             * @return the state of this resource
218:             */
219:            CmsResourceState getState();
220:
221:            /**
222:             * Returns the id of the structure record of this resource.<p>
223:             * 
224:             * @return the id of the structure record of this resource
225:             */
226:            CmsUUID getStructureId();
227:
228:            /**
229:             * Returns the version number of the structure part for this historical resource.<p>
230:             *
231:             * @return the version number of the structure part for this historical resource
232:             */
233:            int getStructureVersion();
234:
235:            /**
236:             * Returns the resource type id for this resource.<p>
237:             *
238:             * @return the resource type id of this resource
239:             */
240:            int getTypeId();
241:
242:            /**
243:             * Returns the user id of the user who created this resource.<p>
244:             * 
245:             * @return the user id
246:             */
247:            CmsUUID getUserCreated();
248:
249:            /**
250:             * Returns the user id of the user who made the last change on this resource.<p>
251:             *
252:             * @return the user id of the user who made the last change<p>
253:             */
254:            CmsUUID getUserLastModified();
255:
256:            /**
257:             * Returns the version number of this historical resource.<p>
258:             *
259:             * @return the version number of this historical resource
260:             */
261:            int getVersion();
262:
263:            /** 
264:             * Returns <code>true</code> if this resource is expired at the given time according to the 
265:             * information stored in {@link #getDateExpired()}.<p>
266:             * 
267:             * @param time the time to check the expiration date against
268:             * 
269:             * @return <code>true</code> if this resource is expired at the given time
270:             *      
271:             * @see #isReleased(long)
272:             * @see #isReleasedAndNotExpired(long)
273:             */
274:            boolean isExpired(long time);
275:
276:            /**
277:             * Returns <code>true</code> if the resource is a file, i.e. can have no sub-resources.<p>
278:             *
279:             * @return true if this resource is a file, false otherwise
280:             */
281:            boolean isFile();
282:
283:            /**
284:             * Returns <code>true</code> if the resource is a folder, i.e. can have sub-resources.<p>
285:             *
286:             * @return true if this resource is a folder, false otherwise
287:             */
288:            boolean isFolder();
289:
290:            /**
291:             * Checks if the resource is internal.<p>
292:             * 
293:             * This state is stored as bit 1 in the resource flags.<p>
294:             * 
295:             * @return true if the resource is internal, otherwise false
296:             */
297:            boolean isInternal();
298:
299:            /**
300:             * Checks if the link has to be labeled with a special icon in the explorer view.<p>
301:             *
302:             * This state is stored as bit 2 in the resource flags.<p>
303:             * 
304:             * @return true if a link to the resource has to be labeled, otherwise false
305:             */
306:            boolean isLabeled();
307:
308:            /** 
309:             * Returns <code>true</code> if this resource is released at the given time according to the 
310:             * information stored in {@link #getDateReleased()}.<p>
311:             * 
312:             * @param time the time to check the release date against
313:             * 
314:             * @return <code>true</code> if this resource is released at the given time
315:             *      
316:             * @see #isExpired(long)
317:             * @see #isReleasedAndNotExpired(long)
318:             */
319:            boolean isReleased(long time);
320:
321:            /** 
322:             * Returns <code>true</code> if this resource is valid at the given time according to the 
323:             * information stored in {@link #getDateReleased()} and {@link #getDateExpired()}.<p>
324:             * 
325:             * A resource is valid if it is released and not yet expired.<p>
326:             * 
327:             * @param time the time to check the release and expiration date against
328:             * 
329:             * @return <code>true</code> if this resource is valid at the given time
330:             *      
331:             * @see #isExpired(long)
332:             * @see #isReleased(long)
333:             */
334:            boolean isReleasedAndNotExpired(long time);
335:
336:            /**
337:             * Returns true if this resource was touched.<p>
338:             * 
339:             * @return boolean true if this resource was touched
340:             */
341:            boolean isTouched();
342:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.