org.ow2.weblab.content.impl
Class FileContentManager
java.lang.Object
org.ow2.weblab.content.impl.FileContentManager
- All Implemented Interfaces:
- ContentReader, ContentWriter
public class FileContentManager
- extends java.lang.Object
- implements ContentReader, ContentWriter
Default implementation for both ContentReader and ContentWriter
|
Method Summary |
java.lang.String |
getContentFolderPath()
|
java.io.File |
readContent(java.net.URI destUri)
Abstract method to implement: the class is expected to save the content and return the URI of the save content. |
protected void |
setContentFolderPath(java.lang.String contentFolderPath)
|
java.net.URI |
writeContent(java.io.InputStream content)
Abstract method to implement : the implementation is expected to save the content in common content repository of the platform and return the URI of the
save content. |
java.net.URI |
writeExposedContent(java.io.InputStream content)
Abstract method to implement : the implementation is expected to save the content in a repository which enables end-user to access the content and return
the final URI of the save content (used for client). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_CONTENT_MANAGER_PROPERTIES_FILE
public static final java.lang.String FILE_CONTENT_MANAGER_PROPERTIES_FILE
- See Also:
- Constant Field Values
FILE_SCHEME
public static final java.lang.String FILE_SCHEME
- See Also:
- Constant Field Values
FOLDER_CONTENT_PATH
public static final java.lang.String FOLDER_CONTENT_PATH
- See Also:
- Constant Field Values
FOLDER_CONTENT_DEFAULT_PATH
public static final java.lang.String FOLDER_CONTENT_DEFAULT_PATH
- See Also:
- Constant Field Values
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
SUFFIX
public static final java.lang.String SUFFIX
- See Also:
- Constant Field Values
FileContentManager
public FileContentManager()
writeContent
public java.net.URI writeContent(java.io.InputStream content)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
- Description copied from interface:
ContentWriter
- Abstract method to implement : the implementation is expected to save the content in common content repository of the platform and return the URI of the
save content.
- Specified by:
writeContent in interface ContentWriter
- Parameters:
content - an inputStream leading to the raw bytes of the content
- Returns:
- the URI of the content saved (which will be used for reading the content later on)
- Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException
writeExposedContent
public java.net.URI writeExposedContent(java.io.InputStream content)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
- Description copied from interface:
ContentWriter
- Abstract method to implement : the implementation is expected to save the content in a repository which enables end-user to access the content and return
the final URI of the save content (used for client).
- Specified by:
writeExposedContent in interface ContentWriter
- Parameters:
content - an inputStream leading to the raw bytes of the content
- Returns:
- the URI of the content saved (which will be used for accessing the content from end-user side)
- Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException
readContent
public java.io.File readContent(java.net.URI destUri)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
- Description copied from interface:
ContentReader
- Abstract method to implement: the class is expected to save the content and return the URI of the save content.
- Specified by:
readContent in interface ContentReader
- Parameters:
destUri - the URI of the content to read
- Returns:
- a java File which should be ready to be used with read rights.
- Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException
getContentFolderPath
public java.lang.String getContentFolderPath()
setContentFolderPath
protected void setContentFolderPath(java.lang.String contentFolderPath)
Copyright © 2004-2011. All Rights Reserved.