org.ow2.weblab.content.api
Interface ContentWriter

All Known Implementing Classes:
FileContentManager

public interface ContentWriter

An interface to be implemented for use with ContentManager. It enable to save content in a common content repository.


Method Summary
 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).
 

Method Detail

writeContent

java.net.URI writeContent(java.io.InputStream content)
                          throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
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.

Parameters:
content - an inputStream leading to the raw bytes of the content
res - a valid WebLab resource associated with 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

java.net.URI writeExposedContent(java.io.InputStream content)
                                 throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
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).

Parameters:
content - an inputStream leading to the raw bytes of the content
res - a valid WebLab resource associated with 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


Copyright © 2004-2011. All Rights Reserved.