Source Code Cross Referenced for IContentItem.java in  » Report » pentaho-report » org » pentaho » core » repository » 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 » Report » pentaho report » org.pentaho.core.repository 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006 Pentaho Corporation.  All rights reserved. 
003:         * This software was developed by Pentaho Corporation and is provided under the terms 
004:         * of the Mozilla Public License, Version 1.1, or any later version. You may not use 
005:         * this file except in compliance with the license. If you need a copy of the license, 
006:         * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho 
007:         * BI Platform.  The Initial Developer is Pentaho Corporation.
008:         *
009:         * Software distributed under the Mozilla Public License is distributed on an "AS IS" 
010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to 
011:         * the license for the specific language governing your rights and limitations.
012:         *
013:         * @created Jul 1, 2005 
014:         * @author Marc Batchelor
015:         * 
016:         */
017:
018:        package org.pentaho.core.repository;
019:
020:        import java.io.IOException;
021:        import java.io.InputStream;
022:        import java.io.OutputStream;
023:        import java.io.Reader;
024:        import java.util.Date;
025:        import java.util.List;
026:
027:        import javax.activation.FileDataSource;
028:
029:        import org.pentaho.core.repository.content.ContentException;
030:        import org.pentaho.core.solution.MimeTypeListener;
031:
032:        /**
033:         * 
034:         * Construction of a new ContentItem is managed by
035:         * ContentLocation.newContentItem. This is because there is a parent-child
036:         * relationship between ContentLocations and content items. To avoid having a
037:         * content item reach back into it's parent to add itself to the children list,
038:         * you instead call the content location to construct a content item. A content
039:         * item cannot exist without a content location.
040:         * 
041:         * @see ContentLocation
042:         * @author mbatchel
043:         * 
044:         */
045:        public interface IContentItem extends MimeTypeListener {
046:
047:            /**
048:             * Keep multiple versions when request for an output stream is received
049:             */
050:            public static final int WRITEMODE_KEEPVERSIONS = 0;
051:
052:            /**
053:             * Overwrite each time a request for a new output stream is received.
054:             */
055:            public static final int WRITEMODE_OVERWRITE = 1;
056:
057:            /**
058:             * Append to existing file when request for a new output stream is received.
059:             */
060:            public static final int WRITEMODE_APPEND = 2;
061:
062:            // Probably not necessary or ever used. Wanted to consider it though.
063:
064:            /**
065:             * @return The ContentItem Id
066:             */
067:            public String getId();
068:
069:            /**
070:             * @return The ContentItem path
071:             */
072:            public String getPath();
073:
074:            /**
075:             * @return The name of the content item
076:             */
077:            public String getName();
078:
079:            /**
080:             * @return The title of the content item
081:             */
082:            public String getTitle();
083:
084:            /**
085:             * @return The MimeType of the content item.
086:             */
087:            public String getMimeType();
088:
089:            /**
090:             * @return The URL (optional) of the content item
091:             */
092:            public String getUrl();
093:
094:            /**
095:             * @return If this is a multiple-versioned style of content item, return the
096:             *         whole list for admin purposes
097:             */
098:            public List getFileVersions();
099:
100:            /**
101:             * Removes all the version from Hibernate
102:             * 
103:             */
104:            public void removeAllVersions();
105:
106:            /**
107:             * Removes the file with the id specified
108:             */
109:            public void removeVersion(String fileId);
110:
111:            /**
112:             * Gets an input stream from the Content item. If the content item doesn't
113:             * exist on disk, throws an exception
114:             * 
115:             * @return An input stream from the file system that is represented by this
116:             *         content item
117:             * @throws ContentException
118:             */
119:            public InputStream getInputStream() throws ContentException;
120:
121:            /**
122:             * Returns a reader from the content item. If the content item doesn't exist
123:             * an exception is thrown.
124:             * 
125:             * @return A Reader from the file system that is pointed to by this content
126:             *         item.
127:             * @throws ContentException
128:             */
129:            public FileDataSource getDataSource();
130:
131:            public Reader getReader() throws ContentException;
132:
133:            /**
134:             * The behavior of this method depends upon it's write mode (defined only at
135:             * construction).
136:             * 
137:             * If the write mode is WRITEMODE_KEEPVERSIONS, this method will create a
138:             * new file on the disk, and add it to it's internal list of files, and
139:             * return an output stream.
140:             * 
141:             * If the write mode is WRITEMODE_OVERWRITE, this method will create an
142:             * output stream and overwrite the existing file on the disk if it's found,
143:             * or will create the file if it doesn't exist.
144:             * 
145:             * If the write mode is WRITEMODE_APPEND, this method will append to the
146:             * existing file on disk (if it exists), or create it if it doesn't exist.
147:             * 
148:             * @param actionName
149:             *            The name of the action that is obtaining the output stream.
150:             * @throws IOException
151:             * @return the OutputStream to write to
152:             */
153:            public OutputStream getOutputStream(String actionName)
154:                    throws IOException;
155:
156:            public void closeOutputStream();
157:
158:            /**
159:             * @return The name of the action from the latest ContentItemFile class that
160:             *         the ContentItem contains.
161:             */
162:            public String getActionName();
163:
164:            /**
165:             * @return This returns the Id of the ContentItemFile class that the
166:             *         ContentItem contains.
167:             */
168:            public String getFileId();
169:
170:            /**
171:             * @return The file size from the latest ContentItemFile class that the
172:             *         ContentItem contains.
173:             */
174:            public long getFileSize();
175:
176:            /**
177:             * @return The file date/time from the latest ContentItemFile class that the
178:             *         ContentItem contains.
179:             */
180:            public Date getFileDateTime();
181:
182:            /**
183:             * Sets the mime type
184:             * 
185:             * @param mimeType
186:             *            The mime type to set.
187:             */
188:            public void setMimeType(String mimeType);
189:
190:            /**
191:             * Removes all versions of this item from
192:             * the repository and removes this item
193:             * from underlying persistence layer.
194:             *
195:             */
196:            public void makeTransient();
197:
198:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.