|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.content.FolderContentManager
public class FolderContentManager
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
Deprecated. |
protected org.apache.commons.httpclient.HttpClient |
client
Deprecated. |
static java.lang.String |
CONTENT_PATH
Deprecated. |
static java.lang.String |
CONTENT_PROPERTIES
Deprecated. |
protected java.io.File |
folder
Deprecated. |
static org.apache.commons.logging.Log |
logger
Deprecated. |
protected java.lang.String |
propertyFileName
Deprecated. |
protected java.lang.String |
propertyKey
Deprecated. |
static java.lang.String |
SIMPLE_RESOURCE_RDF_HELPER
Deprecated. The implementation of ResourceHelper to be used. |
static java.lang.String |
WEBDAV_HOST
Deprecated. |
static java.lang.String |
WEBDAV_PASSWORD
Deprecated. |
static java.lang.String |
WEBDAV_USERNAME
Deprecated. |
protected java.lang.String |
webdavHost
Deprecated. |
protected java.lang.String |
webdavPassword
Deprecated. |
protected java.lang.String |
webdavUserName
Deprecated. |
| Constructor Summary | |
|---|---|
protected |
FolderContentManager()
Deprecated. |
protected |
FolderContentManager(java.lang.String folderPath)
Deprecated. Constructor |
| Method Summary | |
|---|---|
protected static boolean |
checkFolder(java.io.File folder)
Deprecated. Checks if a folder is right configured. |
static void |
copyFile(java.io.File file,
java.io.File newFile)
Deprecated. |
protected java.io.File |
getFileFromResourceAndPredicate(org.ow2.weblab.core.model.Resource res,
org.ow2.weblab.rdf.Value<java.net.URI> values,
java.lang.String pred)
Deprecated. Extract the pred object of res to get the file
in the FolderContentManager. |
java.io.File |
getFileFromWLRi(java.lang.String uri)
Deprecated. Returns the native file corresponding to the WLRI. |
protected java.io.File |
getFileFromWLRi(org.ow2.weblab.core.extended.uri.WebLabRI uri)
Deprecated. Uses to get a file from a WebLabRI from a content manager. |
java.io.File |
getFolder()
Deprecated. |
java.io.File |
getNativeFileFromResource(org.ow2.weblab.core.model.Resource res)
Deprecated. Extract the WebLab.HAS_NATIVE_CONTENT object of res
to get the file in the FolderContentManager. |
java.io.File |
getNormalisedFileFromResource(org.ow2.weblab.core.model.Resource res)
Deprecated. Extract the WebLab.HAS_NORMALISED_CONTENT object of
res to get the file in the FolderContentManager
. |
protected static java.lang.String |
getPropertyValue(java.lang.String propertyPath,
java.lang.String propertyValue,
java.lang.String defaultValue)
Deprecated. Uses this to automatically get a folder path. |
void |
saveNativeContent(java.io.File content,
org.ow2.weblab.core.model.Resource res)
Deprecated. |
void |
saveNativeContentOnWebDAV(java.io.File content,
org.ow2.weblab.core.model.Resource res)
Deprecated. Add new file to the WebDAV content manager |
void |
saveNormalisedContent(java.io.File content,
org.ow2.weblab.core.model.Resource res)
Deprecated. |
void |
setFolder(java.io.File folder)
Deprecated. |
static void |
writeStream(java.io.InputStream is,
java.io.OutputStream os)
Deprecated. Read input from input stream and write it to output stream until there is no more input from input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONTENT_PROPERTIES
public static final java.lang.String CONTENT_PATH
public static final java.lang.String WEBDAV_HOST
public static final java.lang.String WEBDAV_PASSWORD
public static final java.lang.String WEBDAV_USERNAME
public static int BUFFER_SIZE
public static org.apache.commons.logging.Log logger
protected java.lang.String propertyKey
protected java.lang.String propertyFileName
protected java.io.File folder
protected java.lang.String webdavHost
protected java.lang.String webdavUserName
protected java.lang.String webdavPassword
protected org.apache.commons.httpclient.HttpClient client
public static final java.lang.String SIMPLE_RESOURCE_RDF_HELPER
ResourceHelper to be used.
| Constructor Detail |
|---|
protected FolderContentManager()
throws org.ow2.weblab.core.extended.exception.WebLabUncheckedException
org.ow2.weblab.core.extended.exception.WebLabUncheckedException
protected FolderContentManager(java.lang.String folderPath)
throws org.ow2.weblab.core.extended.exception.WebLabUncheckedException
folderPath - The path to the content folder.
org.ow2.weblab.core.extended.exception.WebLabUncheckedException| Method Detail |
|---|
protected static boolean checkFolder(java.io.File folder)
folder is right configured.
folder - The file to check existence.
folder is not configured.
public void saveNativeContent(java.io.File content,
org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
org.ow2.weblab.core.extended.exception.WebLabCheckedException
public void saveNormalisedContent(java.io.File content,
org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
org.ow2.weblab.core.extended.exception.WebLabCheckedException
public void saveNativeContentOnWebDAV(java.io.File content,
org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
content - res -
org.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic java.io.File getFileFromWLRi(java.lang.String uri)
uri - WLRI which identify the native file.
protected java.io.File getFileFromWLRi(org.ow2.weblab.core.extended.uri.WebLabRI uri)
uri - a valid WLRI.
public java.io.File getNativeFileFromResource(org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
WebLab.HAS_NATIVE_CONTENT object of res
to get the file in the FolderContentManager.
res - The resource to extract native content.
org.ow2.weblab.core.extended.exception.WebLabCheckedException
public java.io.File getNormalisedFileFromResource(org.ow2.weblab.core.model.Resource res)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
WebLab.HAS_NORMALISED_CONTENT object of
res to get the file in the FolderContentManager
.
res - The resource to extract normalised content.
org.ow2.weblab.core.extended.exception.WebLabCheckedException
protected java.io.File getFileFromResourceAndPredicate(org.ow2.weblab.core.model.Resource res,
org.ow2.weblab.rdf.Value<java.net.URI> values,
java.lang.String pred)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
pred object of res to get the file
in the FolderContentManager.
res - The resource to extract content.pred - The predicate used to find content URI in res annotations.
org.ow2.weblab.core.extended.exception.WebLabCheckedException
protected static java.lang.String getPropertyValue(java.lang.String propertyPath,
java.lang.String propertyValue,
java.lang.String defaultValue)
propertyPath - path to the property file.propertyValue - name of the key in the property file.defaultValue - value returned if unable to get one.
public java.io.File getFolder()
public void setFolder(java.io.File folder)
folder - The folder to set.
public static void writeStream(java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
is - input stream the input stream to read from.os - output stream the output stream to write to.buf - the byte array to use as a buffer
java.io.IOException
public static void copyFile(java.io.File file,
java.io.File newFile)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
file - Input filenewFile - Output file
org.ow2.weblab.core.extended.exception.WebLabCheckedException - If an IOException occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||