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 11, 2005
014: * @author James Dixon
015: *
016: */
017:
018: package org.pentaho.core.services;
019:
020: import java.io.InputStream;
021: import java.io.OutputStream;
022: import java.io.Reader;
023: import java.util.Date;
024: import java.util.List;
025:
026: import javax.activation.FileDataSource;
027:
028: import org.pentaho.core.repository.IContentItem;
029: import org.pentaho.core.repository.content.ContentException;
030:
031: public class SimpleContentItem implements IContentItem {
032:
033: private String mimeType;
034:
035: private OutputStream outputStream;
036:
037: public SimpleContentItem() {
038: outputStream = null;
039: }
040:
041: public SimpleContentItem(OutputStream outputStream) {
042: this .outputStream = outputStream;
043: }
044:
045: public void closeOutputStream() {
046: // nothing to do here
047: }
048:
049: public String getId() {
050: return null;
051: }
052:
053: public String getPath() {
054: return null;
055: }
056:
057: public String getName() {
058: return null;
059: }
060:
061: public String getTitle() {
062: return null;
063: }
064:
065: public String getMimeType() {
066: return mimeType;
067: }
068:
069: public void setMimeType(String mimeType) {
070: this .mimeType = mimeType;
071: }
072:
073: public String getUrl() {
074: return null;
075: }
076:
077: public List getFileVersions() {
078: return null;
079: }
080:
081: public void removeAllVersions() {
082: }
083:
084: public void removeVersion(String fileId) {
085: }
086:
087: public InputStream getInputStream() throws ContentException {
088: return null;
089: }
090:
091: public Reader getReader() throws ContentException {
092: return null;
093: }
094:
095: public OutputStream getOutputStream(String actionName) {
096: return outputStream;
097: }
098:
099: public void setOutputStream(OutputStream outputStream) {
100: this .outputStream = outputStream;
101: }
102:
103: public FileDataSource getDataSource() {
104: // TODO
105: return null;
106: }
107:
108: public String getActionName() {
109: return null;
110: }
111:
112: public String getFileId() {
113: return null;
114: }
115:
116: public long getFileSize() {
117: return 0;
118: }
119:
120: public Date getFileDateTime() {
121: return null;
122: }
123:
124: public void makeTransient() {
125: // NOOP
126: }
127: }
|