com.opensymphony.xwork2
Interface FileManager

All Known Implementing Classes:
DefaultFileManager

public interface FileManager

Basic interface to access file on the File System and to monitor changes


Method Summary
 boolean fileNeedsReloading(String fileName)
          Checks if given file changed and must be reloaded if isReloadingConfigs() is true
 boolean fileNeedsReloading(URL fileUrl)
          Checks if file represented by provided URL should be reloaded
 boolean isReloadingConfigs()
           
 InputStream loadFile(URL fileUrl)
          Loads opens the named file and returns the InputStream
 void monitorFile(URL fileUrl)
          Adds file to list of monitored files if isReloadingConfigs() is true
 void setReloadingConfigs(boolean reloadingConfigs)
           
 

Method Detail

setReloadingConfigs

void setReloadingConfigs(boolean reloadingConfigs)

isReloadingConfigs

boolean isReloadingConfigs()

fileNeedsReloading

boolean fileNeedsReloading(String fileName)
Checks if given file changed and must be reloaded if isReloadingConfigs() is true

Parameters:
fileName - to check
Returns:
true if file changed

fileNeedsReloading

boolean fileNeedsReloading(URL fileUrl)
Checks if file represented by provided URL should be reloaded

Parameters:
fileUrl - url to a file
Returns:
true if file exists and should be reloaded, if url is null return false

loadFile

InputStream loadFile(URL fileUrl)
Loads opens the named file and returns the InputStream

Parameters:
fileUrl - - the URL of the file to open
Returns:
an InputStream of the file contents or null
Throws:
IllegalArgumentException - if there is no file with the given file name

monitorFile

void monitorFile(URL fileUrl)
Adds file to list of monitored files if isReloadingConfigs() is true

Parameters:
fileUrl - URL to file to be monitored


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.