Documentation
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / config / Configurable.java
index 26586ba..ca10556 100644 (file)
@@ -5,11 +5,44 @@ import java.util.Map;
 \r
 import com.indexdata.pz2utils4jsf.errors.ConfigurationException;\r
 \r
+/**\r
+ * Interface to be implemented by any part of an application that wish to\r
+ * use a ConfigurationReader for it's configuration. The Configurables that\r
+ * come with the project are a Pazpar2 client and a Service Proxy client\r
+ * \r
+ * @author Niels Erik\r
+ *\r
+ */\r
 public interface Configurable {\r
 \r
+  /**\r
+   * Configures the Configurable using the configuration obtained by the \r
+   * provided configuration reader\r
+   * @param reader used for reading the configuration \r
+   * @throws ConfigurationException\r
+   */\r
   public void configure(ConfigurationReader reader) throws ConfigurationException;\r
+  \r
+  /**\r
+   * Returns the default parameters that the configurable has defined for itself\r
+   * Should be invoked by the configuration reader before it possibly overrides\r
+   * some parameters obtained from the external configuration source  \r
+   * @return\r
+   */\r
   public Map<String,String> getDefaults();\r
+  \r
+  /**\r
+   * Returns the name of the module, can be used by a configuration reader that \r
+   * has distinguishes between sets of configuration properties by component name\r
+   * @return name of the part that is to be configured\r
+   */\r
   public String getModuleName();\r
+  \r
+  /**\r
+   * The components documentation of how it was configured. \r
+   * \r
+   * @return a list of Strings describing configuration details\r
+   */\r
   public List<String> documentConfiguration(); \r
   \r
 }\r