public class ContentManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONTENT_MANAGER_PROPERTIES_FILE |
protected static ContentManager |
instance |
protected org.apache.commons.logging.Log |
logger |
protected ContentReader |
reader |
static java.lang.String |
READER_DEFAULT_IMPLEMENTATION |
static java.lang.String |
READER_IMPLEMENTATION |
protected ContentWriter |
writer |
static java.lang.String |
WRITER_DEFAULT_IMPLEMENTATION |
static java.lang.String |
WRITER_IMPLEMENTATION |
| Modifier and Type | Method and Description |
|---|---|
static ContentManager |
getInstance()
Default starting method to get the ContentManager instance.
|
static java.lang.String |
getPropertyValue(java.lang.String propertyPath,
java.lang.String propertyKey,
java.lang.String defaultValue)
Uses this to automatically get a folder path.
|
ContentReader |
getReader()
Accessor to the internally used content reader.
|
ContentWriter |
getWriter()
Accessor to the internally used content writer.
|
java.io.File |
readNativeContent(org.ow2.weblab.core.model.Resource res)
Read annotation on the input resource and get access to its native content through a JAVA file.
|
java.io.File |
readNormalisedContent(org.ow2.weblab.core.model.Resource res)
Read annotation on the input resource and get access to its normalised content through a JAVA file.
|
java.net.URI |
writeNativeContent(java.io.InputStream content,
org.ow2.weblab.core.model.Resource res)
Write the input stream to the content manager and annotate the WebLab resource to link it to the native content
|
java.net.URI |
writeNormalisedContent(java.io.InputStream content,
org.ow2.weblab.core.model.Resource res)
Write the input stream to the content manager and annotate the WebLab resource to link it to the normalised content
|
public static final java.lang.String CONTENT_MANAGER_PROPERTIES_FILE
public static final java.lang.String READER_IMPLEMENTATION
public static final java.lang.String READER_DEFAULT_IMPLEMENTATION
public static final java.lang.String WRITER_IMPLEMENTATION
public static final java.lang.String WRITER_DEFAULT_IMPLEMENTATION
protected static ContentManager instance
protected final org.apache.commons.logging.Log logger
protected final ContentWriter writer
protected final ContentReader reader
public static ContentManager getInstance()
public static java.lang.String getPropertyValue(java.lang.String propertyPath,
java.lang.String propertyKey,
java.lang.String defaultValue)
propertyPath - path to the property file.propertyKey - name of the key in the property file.defaultValue - value returned if unable to get one.public java.net.URI writeNativeContent(java.io.InputStream content,
org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
res - standard WebLab Resourcecontent - an InputStream which could be consumed to get the raw contentorg.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic java.net.URI writeNormalisedContent(java.io.InputStream content,
org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
res - standard WebLab Resourcecontent - an InputStream which could be consumed to get the raw contentorg.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic java.io.File readNativeContent(org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
a - standard WebLab Resourceorg.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic java.io.File readNormalisedContent(org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
a - standard WebLab Resourceorg.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic ContentReader getReader()
public ContentWriter getWriter()
Copyright © 2004-2012. All Rights Reserved.