|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.config.JadicePropertiesConfiguration
public class JadicePropertiesConfiguration
This class is intended to apply general jadice configuration settings.
jadice applications are usually accompanied by general jadice configuration settings. These settings are normally given by a configuration file Jadice.properties, which can be found in the default package of the jadice library.
It is mandatory to apply the configuration before using any other jadice functionality. The configuration has to be applied exactly once.
The usual use case is to load the configuration from the file Jadice.properties. This can be done
by calling configure()
. This method must be called exactly once at application startup time.
For advanced use cases it can be useful to load the configuration from a different source. Therefore the
parameterized configure methods can be used instead of configure()
.
Method Summary | |
---|---|
static void |
configure()
Loads the configuration from the file Jadice.properties. |
static void |
configure(File f)
Loads the configuration from the given Properties file. |
static void |
configure(InputStream is)
Loads the configuration as Properties (key and element pairs) from the given InputStream . |
static void |
configure(com.levigo.util.preferences.PreferenceStore ps)
Loads the configuration from the given PreferenceStore . |
static void |
configure(Properties p)
Loads the configuration from the given Properties . |
static void |
configure(String name)
Loads the configuration as a Properties resource with given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void configure()
Hint: Only one of the configure methods must be called exactly once at application startup time.
public static void configure(File f) throws IOException
Properties
file.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
f
- the file to load
IOException
public static void configure(String name) throws IOException
Properties
resource with given name.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
name
- the name of the resource to load
IOException
public static void configure(InputStream is) throws IOException
Properties
(key and element pairs) from the given InputStream
.
For more details about the properties format see Properties.load(InputStream)
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
is
- the stream to load
IOException
public static void configure(Properties p)
Properties
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
p
- the properties to loadpublic static void configure(com.levigo.util.preferences.PreferenceStore ps)
PreferenceStore
.
Hint: Only one of the configure methods must be called exactly once at application startup time.
ps
- the PreferenceStore
to load
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |