public interface FileManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
fileNeedsReloading(String fileName)
Checks if given file changed and must be reloaded if
setReloadingConfigs(boolean) is true |
boolean |
fileNeedsReloading(URL fileUrl)
Checks if file represented by provided URL should be reloaded
|
Collection<? extends URL> |
getAllPhysicalUrls(URL url) |
boolean |
internal()
User's implementation should return false as then it will be taken in first place
|
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
setReloadingConfigs(boolean) is true |
URL |
normalizeToFileProtocol(URL url)
Convert URLs to URLs with "file" protocol
|
void |
setReloadingConfigs(boolean reloadingConfigs)
Enables configs reloading when config file changed
|
boolean |
support()
Indicate if given implementation supports current OS File System
|
void setReloadingConfigs(boolean reloadingConfigs)
reloadingConfigs - XWorkConstants.RELOAD_XML_CONFIGURATIONboolean fileNeedsReloading(String fileName)
setReloadingConfigs(boolean) is truefileName - to checkboolean fileNeedsReloading(URL fileUrl)
fileUrl - url to a fileInputStream loadFile(URL fileUrl)
fileUrl - - the URL of the file to openIllegalArgumentException - if there is no file with the given file namevoid monitorFile(URL fileUrl)
setReloadingConfigs(boolean) is truefileUrl - URL to file to be monitoredURL normalizeToFileProtocol(URL url)
url - URL to convert to a jar urlboolean support()
boolean internal()
Collection<? extends URL> getAllPhysicalUrls(URL url) throws IOException
IOExceptionCopyright © 2000–2017 Apache Software Foundation. All rights reserved.