info.magnolia.module.resources.loaders
Class FileSystemResourceLoader

java.lang.Object
  extended by info.magnolia.module.resources.loaders.FileSystemResourceLoader
All Implemented Interfaces:
ResourceLoader

public class FileSystemResourceLoader
extends Object
implements ResourceLoader

Loader which looks for resources in file system. Example of path definition: [] fileSystemLoader - class info.magnolia.module.resources.loaders.FileSystemResourceLoader - path /home/jsimak/


Constructor Summary
FileSystemResourceLoader()
           
 
Method Summary
 String getPath()
           
 InputStream getStream(String templatePath)
          Gets InputStream from template file.
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 void setPath(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemResourceLoader

public FileSystemResourceLoader()
Method Detail

getStream

public InputStream getStream(String templatePath)
                      throws IOException
Description copied from interface: ResourceLoader
Gets InputStream from template file.

Specified by:
getStream in interface ResourceLoader
Returns:
InputStream if resource was found or null otherwise
Throws:
IOException

setEnabled

public void setEnabled(boolean enabled)

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface ResourceLoader
Returns:
true if loader is enabled or false otherwise

setPath

public void setPath(String path)

getPath

public String getPath()


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.