org.gcube.portlets.user.homelibrary.util.config.easyconf
Class FileConfigurationChangedReloadingStrategy

java.lang.Object
  extended by org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
      extended by org.gcube.portlets.user.homelibrary.util.config.easyconf.FileConfigurationChangedReloadingStrategy
All Implemented Interfaces:
org.apache.commons.configuration.reloading.ReloadingStrategy

public class FileConfigurationChangedReloadingStrategy
extends org.apache.commons.configuration.reloading.FileChangedReloadingStrategy

Reloads the configuration file even if a base path wasn't originally specified. This happens for example when it has been loaded from the classpath. It works too for files that are inside JAR files.


Field Summary
 
Fields inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
configuration, lastChecked, lastModified, refreshDelay
 
Constructor Summary
FileConfigurationChangedReloadingStrategy()
           
 
Method Summary
protected  File getFile()
           
protected  URL getSourceURL()
           
protected  boolean hasChanged()
          Check if the configuration has changed since the last time it was loaded.
 void setConfiguration(org.apache.commons.configuration.FileConfiguration configuration)
           
protected  void setSourceURL(URL url)
           
protected  void updateLastModified()
          Update the last modified time.
 
Methods inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
getRefreshDelay, init, reloadingPerformed, reloadingRequired, setRefreshDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConfigurationChangedReloadingStrategy

public FileConfigurationChangedReloadingStrategy()
Method Detail

setConfiguration

public void setConfiguration(org.apache.commons.configuration.FileConfiguration configuration)
Specified by:
setConfiguration in interface org.apache.commons.configuration.reloading.ReloadingStrategy
Overrides:
setConfiguration in class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy

setSourceURL

protected void setSourceURL(URL url)

getSourceURL

protected URL getSourceURL()

updateLastModified

protected void updateLastModified()
Update the last modified time.

Overrides:
updateLastModified in class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy

hasChanged

protected boolean hasChanged()
Check if the configuration has changed since the last time it was loaded.

Overrides:
hasChanged in class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy

getFile

protected File getFile()
Overrides:
getFile in class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy


Copyright © 2013. All Rights Reserved.