|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dsrg.sofa.repository.ConfigurationHelper
public class ConfigurationHelper
This class should be used for operations with NodeConfiguration object and its XML file.
Constructor Summary | |
---|---|
ConfigurationHelper()
|
Method Summary | |
---|---|
static NodeConfiguration |
createStandardConfiguration()
Creates configuration with standard values. |
static NodeConfiguration |
createStandardConfiguration(java.lang.String repHostName,
int repPort,
java.lang.String repContext)
Creates configuration with given values. |
static NodeConfiguration |
loadNodeConfiguration(java.lang.String filename)
Loads NodeConfiguration object from one XML file specified by filename via XMLResource. |
static NodeConfiguration |
loadNodeConfiguration(java.net.URL url)
Loads NodeConfiguration object from one XML file specified by relative filename via XMLResource. |
protected static java.io.InputStream |
openURLForConfiguration(java.net.URL url)
Opens URL connection for specified URL by internal HTTPClient object. |
static void |
saveNodeConfiguration(NodeConfiguration nc,
java.lang.String relativeFileName)
Saves NodeConfiguration object into one XML file specified by relative filename via XMLResource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationHelper()
Method Detail |
---|
public static NodeConfiguration createStandardConfiguration()
public static NodeConfiguration createStandardConfiguration(java.lang.String repHostName, int repPort, java.lang.String repContext)
repHostName
- repository host namerepPort
- repository portrepContext
- repository context
public static void saveNodeConfiguration(NodeConfiguration nc, java.lang.String relativeFileName) throws java.io.IOException
nc
- object to saverelativeFileName
- filename with relative path
java.io.IOException
- thrown if Resource cannot be savedpublic static NodeConfiguration loadNodeConfiguration(java.net.URL url) throws java.io.IOException
relativeFileName
- used by URI.createFileURI
java.io.IOException
public static NodeConfiguration loadNodeConfiguration(java.lang.String filename) throws java.io.IOException
filename
- used for opening FileInputStream
java.io.IOException
protected static java.io.InputStream openURLForConfiguration(java.net.URL url) throws java.io.IOException
url
- URL to open
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |