|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jconfig.handler.URLHandler
This class will read the content from an URL and generate the
properties. If you have the need to use a proxy server, create
jconfig.properties file and place it inside your system path.
jconfig.properties example:
# jconfig.properties file
http.proxyHost=proxy.server.url
http.proxyPort=3128
Constructor Summary | |
URLHandler()
|
Method Summary | |
void |
addFileListener(FileListener fileListener)
|
void |
fileChanged(FileListenerEvent event)
This method, once implemented, will be called when the File object itself changes. |
java.lang.String |
getURL()
|
Configuration |
load()
|
Configuration |
load(java.lang.String configName)
This method loads a configuration and returns it |
Configuration |
load(java.lang.String configName,
ConfigurationParser parser)
This method loads a configuration using a specific parser and returns it |
protected Configuration |
load(java.lang.String theURL,
java.lang.String configName)
|
protected Configuration |
load(java.lang.String theURL,
java.lang.String configName,
ConfigurationParser parser)
|
void |
setURL(java.lang.String url)
|
void |
setValidation(boolean validate)
This defines if the file will be vaidated using a DTD. |
void |
store(Configuration configuration)
This method should store all categories and properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLHandler()
Method Detail |
public void setURL(java.lang.String url)
public void setValidation(boolean validate)
validate
- defines the validationpublic Configuration load() throws ConfigurationManagerException
ConfigurationManagerException
public void fileChanged(FileListenerEvent event)
FileListener
fileChanged
in interface FileListener
public Configuration load(java.lang.String configName) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configName
- the name of the configuration
ConfigurationManagerException
- if the file cannot be processedpublic Configuration load(java.lang.String configName, ConfigurationParser parser) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configName
- the name of the configurationparser
- the parser that should be used
ConfigurationManagerException
protected Configuration load(java.lang.String theURL, java.lang.String configName) throws ConfigurationManagerException
ConfigurationManagerException
protected Configuration load(java.lang.String theURL, java.lang.String configName, ConfigurationParser parser) throws ConfigurationManagerException
ConfigurationManagerException
public void store(Configuration configuration) throws ConfigurationManagerException
store
in interface ConfigurationHandler
configuration
- the Configuration that should be saved
ConfigurationManagerException
public void addFileListener(FileListener fileListener)
public java.lang.String getURL()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |