| org.pentaho.core.repository.IContentItem
All known Subclasses: org.pentaho.repository.content.ContentItem, org.pentaho.core.services.SimpleContentItem, org.pentaho.core.services.HttpContentItem,
IContentItem | public interface IContentItem extends MimeTypeListener(Code) | | Construction of a new ContentItem is managed by
ContentLocation.newContentItem. This is because there is a parent-child
relationship between ContentLocations and content items. To avoid having a
content item reach back into it's parent to add itself to the children list,
you instead call the content location to construct a content item. A content
item cannot exist without a content location.
See Also: ContentLocation author: mbatchel |
WRITEMODE_APPEND | final public static int WRITEMODE_APPEND(Code) | | Append to existing file when request for a new output stream is received.
|
WRITEMODE_KEEPVERSIONS | final public static int WRITEMODE_KEEPVERSIONS(Code) | | Keep multiple versions when request for an output stream is received
|
WRITEMODE_OVERWRITE | final public static int WRITEMODE_OVERWRITE(Code) | | Overwrite each time a request for a new output stream is received.
|
closeOutputStream | public void closeOutputStream()(Code) | | |
getActionName | public String getActionName()(Code) | | The name of the action from the latest ContentItemFile class thatthe ContentItem contains. |
getDataSource | public FileDataSource getDataSource()(Code) | | Returns a reader from the content item. If the content item doesn't exist
an exception is thrown.
A Reader from the file system that is pointed to by this contentitem. throws: ContentException - |
getFileDateTime | public Date getFileDateTime()(Code) | | The file date/time from the latest ContentItemFile class that theContentItem contains. |
getFileId | public String getFileId()(Code) | | This returns the Id of the ContentItemFile class that theContentItem contains. |
getFileSize | public long getFileSize()(Code) | | The file size from the latest ContentItemFile class that theContentItem contains. |
getFileVersions | public List getFileVersions()(Code) | | If this is a multiple-versioned style of content item, return thewhole list for admin purposes |
getInputStream | public InputStream getInputStream() throws ContentException(Code) | | Gets an input stream from the Content item. If the content item doesn't
exist on disk, throws an exception
An input stream from the file system that is represented by thiscontent item throws: ContentException - |
getMimeType | public String getMimeType()(Code) | | The MimeType of the content item. |
getName | public String getName()(Code) | | The name of the content item |
getOutputStream | public OutputStream getOutputStream(String actionName) throws IOException(Code) | | The behavior of this method depends upon it's write mode (defined only at
construction).
If the write mode is WRITEMODE_KEEPVERSIONS, this method will create a
new file on the disk, and add it to it's internal list of files, and
return an output stream.
If the write mode is WRITEMODE_OVERWRITE, this method will create an
output stream and overwrite the existing file on the disk if it's found,
or will create the file if it doesn't exist.
If the write mode is WRITEMODE_APPEND, this method will append to the
existing file on disk (if it exists), or create it if it doesn't exist.
Parameters: actionName - The name of the action that is obtaining the output stream. throws: IOException - the OutputStream to write to |
getTitle | public String getTitle()(Code) | | The title of the content item |
getUrl | public String getUrl()(Code) | | The URL (optional) of the content item |
makeTransient | public void makeTransient()(Code) | | Removes all versions of this item from
the repository and removes this item
from underlying persistence layer.
|
removeAllVersions | public void removeAllVersions()(Code) | | Removes all the version from Hibernate
|
removeVersion | public void removeVersion(String fileId)(Code) | | Removes the file with the id specified
|
setMimeType | public void setMimeType(String mimeType)(Code) | | Sets the mime type
Parameters: mimeType - The mime type to set. |
|
|