|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.util.fs.DefaultFileManager
public class DefaultFileManager
Default implementation of FileManager
Field Summary | |
---|---|
protected static Map<String,Revision> |
files
|
protected boolean |
reloadingConfigs
|
Constructor Summary | |
---|---|
DefaultFileManager()
|
Method Summary | |
---|---|
boolean |
fileNeedsReloading(String fileName)
Checks if given file changed and must be reloaded if FileManager.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 |
protected boolean |
isJarURL(URL fileUrl)
Check if given URL is matching Jar pattern for different servers |
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 FileManager.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Map<String,Revision> files
protected boolean reloadingConfigs
Constructor Detail |
---|
public DefaultFileManager()
Method Detail |
---|
public void setReloadingConfigs(boolean reloadingConfigs)
FileManager
setReloadingConfigs
in interface FileManager
reloadingConfigs
- XWorkConstants.RELOAD_XML_CONFIGURATION
public boolean fileNeedsReloading(URL fileUrl)
FileManager
fileNeedsReloading
in interface FileManager
fileUrl
- url to a file
public boolean fileNeedsReloading(String fileName)
FileManager
FileManager.setReloadingConfigs(boolean)
is true
fileNeedsReloading
in interface FileManager
fileName
- to check
public InputStream loadFile(URL fileUrl)
FileManager
loadFile
in interface FileManager
fileUrl
- - the URL of the file to open
public void monitorFile(URL fileUrl)
FileManager
FileManager.setReloadingConfigs(boolean)
is true
monitorFile
in interface FileManager
fileUrl
- URL
to file to be monitoredprotected boolean isJarURL(URL fileUrl)
fileUrl
-
public URL normalizeToFileProtocol(URL url)
FileManager
normalizeToFileProtocol
in interface FileManager
url
- URL to convert to a jar url
public boolean support()
FileManager
support
in interface FileManager
public boolean internal()
FileManager
internal
in interface FileManager
public Collection<? extends URL> getAllPhysicalUrls(URL url) throws IOException
getAllPhysicalUrls
in interface FileManager
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |