org.apache.james.container.spring.adaptor
Class FileSystemBridge

java.lang.Object
  extended by org.apache.james.container.spring.adaptor.FileSystemBridge
All Implemented Interfaces:
FileSystem, org.springframework.context.ResourceLoaderAware

public class FileSystemBridge
extends java.lang.Object
implements FileSystem, org.springframework.context.ResourceLoaderAware


Field Summary
 
Fields inherited from interface org.apache.james.services.FileSystem
ROLE
 
Constructor Summary
FileSystemBridge()
           
 
Method Summary
 java.io.File getBasedir()
          Return the base folder used by the application
 java.io.File getFile(java.lang.String fileURL)
          Used to retrieve a specific file in the application context
 java.io.InputStream getResource(java.lang.String url)
          loads resources from classpath or file system
protected  org.springframework.core.io.ResourceLoader getResourceLoader()
           
 void setResourceLoader(org.springframework.core.io.ResourceLoader provider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemBridge

public FileSystemBridge()
Method Detail

getBasedir

public java.io.File getBasedir()
                        throws java.io.FileNotFoundException
Description copied from interface: FileSystem
Return the base folder used by the application

Specified by:
getBasedir in interface FileSystem
Throws:
java.io.FileNotFoundException

getResource

public java.io.InputStream getResource(java.lang.String url)
                                throws java.io.IOException
loads resources from classpath or file system

Specified by:
getResource in interface FileSystem
Parameters:
url - the url of the resource
Returns:
the resource as an input stream
Throws:
java.io.IOException - if the resource could not be accessed

getFile

public java.io.File getFile(java.lang.String fileURL)
                     throws java.io.FileNotFoundException
Description copied from interface: FileSystem
Used to retrieve a specific file in the application context

Specified by:
getFile in interface FileSystem
Parameters:
fileURL - file
Returns:
the File found
Throws:
java.io.FileNotFoundException - if the file cannot be found/read
See Also:
FileSystem.getFile(String filURL)

getResourceLoader

protected org.springframework.core.io.ResourceLoader getResourceLoader()

setResourceLoader

public void setResourceLoader(org.springframework.core.io.ResourceLoader provider)
Specified by:
setResourceLoader in interface org.springframework.context.ResourceLoaderAware


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.