org.pentaho.platform.repository.content
Class ContentItemFile
java.lang.Object
org.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.repository.content.ContentItemFile
- All Implemented Interfaces:
- Serializable, ILogger, IContentItemFile
public class ContentItemFile
- extends PentahoBase
- implements IContentItemFile
- See Also:
- Serialized Form
| Fields inherited from interface org.pentaho.platform.api.engine.ILogger |
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN |
| Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn |
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
getMessages
public List getMessages()
getRevision
public int getRevision()
- Returns:
- Returns the revision.
setRevision
public void setRevision(int revision)
- Parameters:
revision - The revision to set.
getInputStream
public InputStream getInputStream()
throws ContentException
- Specified by:
getInputStream in interface IContentItemFile
- Returns:
- An input stream from the file on disk
- Throws:
ContentException
getReader
public Reader getReader()
throws ContentException
- Specified by:
getReader in interface IContentItemFile
- Returns:
- A Reader from the file on disk.
- Throws:
ContentException
getOutputStream
public OutputStream getOutputStream(boolean overWriteOk)
throws ContentException
- Specified by:
getOutputStream in interface IContentItemFile
- Parameters:
overWriteOk - Indicates whether overwriting the file on disk is ok.
(determined by the write mode of the containing ContentItem).
- Returns:
- An OutputStream to write to
- Throws:
ContentException
getOutputStream
public OutputStream getOutputStream(boolean overWriteOk,
boolean append)
throws ContentException
- Specified by:
getOutputStream in interface IContentItemFile
- Parameters:
overWriteOk - Indicates whether overwriting the file on disk is ok.
(determined by the write mode of the containing ContentItem).append - Indicates whether to append to the file.
- Returns:
- An OutputStream to write to
- Throws:
ContentException
copyToFile
public long copyToFile(String newFileName)
throws ContentException
- Description copied from interface:
IContentItemFile
- Copies the latest file to another location
- Specified by:
copyToFile in interface IContentItemFile
- Parameters:
newFileName - File name to copy to. Must be fully qualified.
- Returns:
- Number of bytes copied
- Throws:
ContentException
deleteOsFile
public boolean deleteOsFile()
- Description copied from interface:
IContentItemFile
- Deletes the file in the Operating System
- Specified by:
deleteOsFile in interface IContentItemFile
- Returns:
- Success indicator
getParent
public ContentItem getParent()
- Returns:
- Returns the parent.
setParent
public void setParent(ContentItem parent)
- Parameters:
parent - The parent to set.
getActionName
public String getActionName()
- Specified by:
getActionName in interface IContentItemFile
- Returns:
- Returns the actionName.
setActionName
public void setActionName(String actionName)
- Parameters:
actionName - The actionName to set.
getFileDateTime
public Date getFileDateTime()
- Specified by:
getFileDateTime in interface IContentItemFile
- Returns:
- Returns the fileDateTime.
getFileSize
public long getFileSize()
- Specified by:
getFileSize in interface IContentItemFile
- Returns:
- Returns the fileSize.
setFileSize
public void setFileSize(long fileSize)
- Parameters:
fileSize - The fileSize to set.
getId
public String getId()
- Specified by:
getId in interface IContentItemFile
- Returns:
- Returns the id.
setId
public void setId(String id)
- Parameters:
id - The id to set.
getOsFileName
public String getOsFileName()
- Specified by:
getOsFileName in interface IContentItemFile
- Returns:
- Returns the osFileName.
setOsFileName
public void setOsFileName(String osFileName)
- Parameters:
osFileName - The osFileName to set.
getOsPath
public String getOsPath()
- Specified by:
getOsPath in interface IContentItemFile
- Returns:
- Returns the osPath.
setOsPath
public void setOsPath(String osPath)
- Parameters:
osPath - The osPath to set.
getInitialized
public int getInitialized()
- Returns:
- Returns the initialized.
setInitialized
public void setInitialized(int initialized)
- Parameters:
initialized - The initialized to set.
getItemFile
public File getItemFile()
- Returns:
- Returns the itemFile.
setItemFile
public void setItemFile(File itemFile)
- Parameters:
itemFile - The itemFile to set.
getLogger
public Log getLogger()
- Specified by:
getLogger in class PentahoBase
toString
public String toString()
- Overrides:
toString in class Object