1 package com.indexdata.mkjsf.config;
\r
3 import java.util.List;
\r
4 import java.util.Map;
\r
6 import com.indexdata.mkjsf.errors.ConfigurationException;
\r
9 * Interface to be implemented by any part of an application that wish to
\r
10 * use a ConfigurationReader for it's configuration. The Configurables that
\r
11 * come with the project are a Pazpar2 client and a Service Proxy client
\r
13 * @author Niels Erik
\r
16 public interface Configurable {
\r
19 * Configures the Configurable using the configuration obtained by the
\r
20 * provided configuration reader
\r
21 * @param reader used for reading the configuration
\r
22 * @throws ConfigurationException
\r
24 public void configure(ConfigurationReader reader) throws ConfigurationException;
\r
27 * Returns the default parameters that the configurable has defined for itself
\r
28 * Should be invoked by the configuration reader before it possibly overrides
\r
29 * some parameters obtained from the external configuration source
\r
32 public Map<String,String> getDefaults();
\r
35 * Returns the name of the module, can be used by a configuration reader that
\r
36 * distinguishes between sets of configuration properties by component name, a
\r
37 * name space of sorts.
\r
38 * @return name of the part that is to be configured
\r
40 public String getModuleName();
\r
43 * The components documentation of how it was configured.
\r
45 * @return a list of Strings describing configuration details
\r
47 public List<String> documentConfiguration();
\r