org.ow2.weblab.content.impl
Class SecureFileContentManager

java.lang.Object
  extended by org.ow2.weblab.content.impl.FileContentManager
      extended by org.ow2.weblab.content.impl.SecureFileContentManager
All Implemented Interfaces:
ContentReader, ContentWriter

public final class SecureFileContentManager
extends FileContentManager


Field Summary
 
Fields inherited from class org.ow2.weblab.content.impl.FileContentManager
FILE_CONTENT_MANAGER_PROPERTIES_FILE, FILE_SCHEME, FOLDER_CONTENT_DEFAULT_PATH, FOLDER_CONTENT_PATH, NETWORK_SCHEMES, PREFIX, SUFFIX
 
Constructor Summary
SecureFileContentManager()
           
 
Method Summary
 java.io.File readContent(java.net.URI destUri)
          This method overrides the unsecure one by verifying if the generated path for files is a child of the file content manager path
 
Methods inherited from class org.ow2.weblab.content.impl.FileContentManager
getContentFolder, getContentFolderPath, getLogger, setContentFolderPath, writeContent, writeExposedContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureFileContentManager

public SecureFileContentManager()
Method Detail

readContent

public java.io.File readContent(java.net.URI destUri)
                         throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
This method overrides the unsecure one by verifying if the generated path for files is a child of the file content manager path

Specified by:
readContent in interface ContentReader
Overrides:
readContent in class FileContentManager
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


Copyright © 2004-2012. All Rights Reserved.