com.levigo.jadice.document.config
Class JadicePropertiesConfiguration

java.lang.Object
  extended by com.levigo.jadice.document.config.JadicePropertiesConfiguration

public class JadicePropertiesConfiguration
extends Object

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

configure

public static void configure()
Loads the configuration from the file Jadice.properties. Normally jadice applications will be configured by a call of this method.

Hint: Only one of the configure methods must be called exactly once at application startup time.


configure

public static void configure(File f)
                      throws IOException
Loads the configuration from the given 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.

Parameters:
f - the file to load
Throws:
IOException

configure

public static void configure(String name)
                      throws IOException
Loads the configuration as a 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.

Parameters:
name - the name of the resource to load
Throws:
IOException

configure

public static void configure(InputStream is)
                      throws IOException
Loads the configuration as 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.

Parameters:
is - the stream to load
Throws:
IOException

configure

public static void configure(Properties p)
Loads the configuration from the given Properties.

Hint: Only one of the configure methods must be called exactly once at application startup time.

Parameters:
p - the properties to load

configure

public static void configure(com.levigo.util.preferences.PreferenceStore ps)
Loads the configuration from the given PreferenceStore.

Hint: Only one of the configure methods must be called exactly once at application startup time.

Parameters:
ps - the PreferenceStore to load


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.