org.ow2.weblab.content
Class FolderContentManager

java.lang.Object
  extended by org.ow2.weblab.content.FolderContentManager
Direct Known Subclasses:
BinaryFolderContentManager

Deprecated.

public class FolderContentManager
extends java.lang.Object

Date:

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

CONTENT_PROPERTIES

public static final java.lang.String CONTENT_PROPERTIES
Deprecated. 
See Also:
Constant Field Values

CONTENT_PATH

public static final java.lang.String CONTENT_PATH
Deprecated. 
See Also:
Constant Field Values

WEBDAV_HOST

public static final java.lang.String WEBDAV_HOST
Deprecated. 
See Also:
Constant Field Values

WEBDAV_PASSWORD

public static final java.lang.String WEBDAV_PASSWORD
Deprecated. 
See Also:
Constant Field Values

WEBDAV_USERNAME

public static final java.lang.String WEBDAV_USERNAME
Deprecated. 
See Also:
Constant Field Values

BUFFER_SIZE

public static int BUFFER_SIZE
Deprecated. 

logger

public static org.apache.commons.logging.Log logger
Deprecated. 

propertyKey

protected java.lang.String propertyKey
Deprecated. 

propertyFileName

protected java.lang.String propertyFileName
Deprecated. 

folder

protected java.io.File folder
Deprecated. 

webdavHost

protected java.lang.String webdavHost
Deprecated. 

webdavUserName

protected java.lang.String webdavUserName
Deprecated. 

webdavPassword

protected java.lang.String webdavPassword
Deprecated. 

client

protected org.apache.commons.httpclient.HttpClient client
Deprecated. 

SIMPLE_RESOURCE_RDF_HELPER

public static final java.lang.String SIMPLE_RESOURCE_RDF_HELPER
Deprecated. 
The implementation of ResourceHelper to be used.

See Also:
Constant Field Values
Constructor Detail

FolderContentManager

protected FolderContentManager()
                        throws org.ow2.weblab.core.extended.exception.WebLabUncheckedException
Deprecated. 
Throws:
org.ow2.weblab.core.extended.exception.WebLabUncheckedException

FolderContentManager

protected FolderContentManager(java.lang.String folderPath)
                        throws org.ow2.weblab.core.extended.exception.WebLabUncheckedException
Deprecated. 
Constructor

Parameters:
folderPath - The path to the content folder.
Throws:
org.ow2.weblab.core.extended.exception.WebLabUncheckedException
Method Detail

checkFolder

protected static boolean checkFolder(java.io.File folder)
Deprecated. 
Checks if a folder is right configured.

Parameters:
folder - The file to check existence.
Returns:
false if folder is not configured.

saveNativeContent

public void saveNativeContent(java.io.File content,
                              org.ow2.weblab.core.model.Resource res)
                       throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

saveNormalisedContent

public void saveNormalisedContent(java.io.File content,
                                  org.ow2.weblab.core.model.Resource res)
                           throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

saveNativeContentOnWebDAV

public void saveNativeContentOnWebDAV(java.io.File content,
                                      org.ow2.weblab.core.model.Resource res)
                               throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Add new file to the WebDAV content manager

Parameters:
content -
res -
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

getFileFromWLRi

public java.io.File getFileFromWLRi(java.lang.String uri)
Deprecated. 
Returns the native file corresponding to the WLRI.

Parameters:
uri - WLRI which identify the native file.
Returns:
a native file.

getFileFromWLRi

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.

Parameters:
uri - a valid WLRI.
Returns:
the file corresponding to the WLRI.

getNativeFileFromResource

public java.io.File getNativeFileFromResource(org.ow2.weblab.core.model.Resource res)
                                       throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Extract the WebLab.HAS_NATIVE_CONTENT object of res to get the file in the FolderContentManager.

Parameters:
res - The resource to extract native content.
Returns:
The file representing the native content of the resource.
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

getNormalisedFileFromResource

public java.io.File getNormalisedFileFromResource(org.ow2.weblab.core.model.Resource res)
                                           throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Extract the WebLab.HAS_NORMALISED_CONTENT object of res to get the file in the FolderContentManager .

Parameters:
res - The resource to extract normalised content.
Returns:
The file representing the normalised content of the resource.
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

getFileFromResourceAndPredicate

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
Deprecated. 
Extract the pred object of res to get the file in the FolderContentManager.

Parameters:
res - The resource to extract content.
pred - The predicate used to find content URI in res annotations.
Returns:
The file representing the content of the resource.
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException

getPropertyValue

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. Load it from a property file.

Parameters:
propertyPath - path to the property file.
propertyValue - name of the key in the property file.
defaultValue - value returned if unable to get one.
Returns:
the path to the file repository folder.

getFolder

public java.io.File getFolder()
Deprecated. 
Returns:
The folder.

setFolder

public void setFolder(java.io.File folder)
Deprecated. 
Parameters:
folder - The folder to set.

writeStream

public static void writeStream(java.io.InputStream is,
                               java.io.OutputStream os)
                        throws java.io.IOException
Deprecated. 
Read input from input stream and write it to output stream until there is no more input from input stream.

Parameters:
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
Throws:
java.io.IOException

copyFile

public static void copyFile(java.io.File file,
                            java.io.File newFile)
                     throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
Deprecated. 
Parameters:
file - Input file
newFile - Output file
Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException - If an IOException occurs.


Copyright © 2004-2011. All Rights Reserved.