Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.loader.store
Class FileResourceStore

java.lang.Object
  extended by org.nuxeo.ecm.webengine.loader.store.FileResourceStore
All Implemented Interfaces:
ResourceStore

public class FileResourceStore
extends Object
implements ResourceStore

Author:
Bogdan Stefanescu

Constructor Summary
FileResourceStore(File root)
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean exists(String name)
           
 byte[] getBytes(String name)
           
 File getFile(String name)
           
 String getLocation()
          A string that uniquely identify the location of that store.
 File getRoot()
           
 InputStream getStream(String name)
           
 URL getURL(String name)
           
 int hashCode()
           
 long lastModified(String name)
           
 void put(String name, byte[] data)
           
 void put(String name, InputStream data)
           
 void remove(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileResourceStore

public FileResourceStore(File root)
                  throws IOException
Throws:
IOException
Method Detail

getRoot

public File getRoot()

getFile

public final File getFile(String name)

exists

public boolean exists(String name)
Specified by:
exists in interface ResourceStore

lastModified

public long lastModified(String name)
Specified by:
lastModified in interface ResourceStore

getURL

public URL getURL(String name)
Specified by:
getURL in interface ResourceStore

getBytes

public byte[] getBytes(String name)
Specified by:
getBytes in interface ResourceStore

getStream

public InputStream getStream(String name)
Specified by:
getStream in interface ResourceStore

remove

public void remove(String name)
Specified by:
remove in interface ResourceStore

put

public void put(String name,
                byte[] data)
         throws IOException
Specified by:
put in interface ResourceStore
Throws:
IOException

put

public void put(String name,
                InputStream data)
         throws IOException
Specified by:
put in interface ResourceStore
Throws:
IOException

getLocation

public String getLocation()
Description copied from interface: ResourceStore
A string that uniquely identify the location of that store. Two stores are considered equals if their locations are the same.

Specified by:
getLocation in interface ResourceStore

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.