X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fpz2utils4jsf%2Fconfig%2FConfigurable.java;h=ca1055619b7c77d6fad1539d5afcc66ff7f3743d;hb=801fbed2d559e224160d473e0860dd765354569f;hp=26586baca122f369d249cc48e58de4824a4c21c1;hpb=edf26614e68f0c3f17d245c1f00f01667fe6ac05;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/pz2utils4jsf/config/Configurable.java b/src/main/java/com/indexdata/pz2utils4jsf/config/Configurable.java index 26586ba..ca10556 100644 --- a/src/main/java/com/indexdata/pz2utils4jsf/config/Configurable.java +++ b/src/main/java/com/indexdata/pz2utils4jsf/config/Configurable.java @@ -5,11 +5,44 @@ import java.util.Map; import com.indexdata.pz2utils4jsf.errors.ConfigurationException; +/** + * Interface to be implemented by any part of an application that wish to + * use a ConfigurationReader for it's configuration. The Configurables that + * come with the project are a Pazpar2 client and a Service Proxy client + * + * @author Niels Erik + * + */ public interface Configurable { + /** + * Configures the Configurable using the configuration obtained by the + * provided configuration reader + * @param reader used for reading the configuration + * @throws ConfigurationException + */ public void configure(ConfigurationReader reader) throws ConfigurationException; + + /** + * Returns the default parameters that the configurable has defined for itself + * Should be invoked by the configuration reader before it possibly overrides + * some parameters obtained from the external configuration source + * @return + */ public Map getDefaults(); + + /** + * Returns the name of the module, can be used by a configuration reader that + * has distinguishes between sets of configuration properties by component name + * @return name of the part that is to be configured + */ public String getModuleName(); + + /** + * The components documentation of how it was configured. + * + * @return a list of Strings describing configuration details + */ public List documentConfiguration(); }