From 9e1936b84f645007967c5c0067d04b99ba14e89a Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Fri, 28 Jun 2013 16:23:10 -0400 Subject: [PATCH] Adds Javadoc on configuration --- .../com/indexdata/mkjsf/config/package-info.java | 42 ++++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/indexdata/mkjsf/config/package-info.java b/src/main/java/com/indexdata/mkjsf/config/package-info.java index 60dc2f5..30f3f51 100644 --- a/src/main/java/com/indexdata/mkjsf/config/package-info.java +++ b/src/main/java/com/indexdata/mkjsf/config/package-info.java @@ -1,18 +1,19 @@ /** - * The library comes with two alternative mechanisms for configuration of an application, but it is - * possible to apply a custom scheme too or not use the configurations at all. - *

The library does require that a configuration scheme is chosen - in beans.xml as described below.

- *

But the library does NOT impose any mandatory parameters in order to start up (except for those required for - * bootstrapping the configuration). The library does know of certain parameters, if it encounters them. + * The library comes with two alternative mechanisms for configuration of an application. It is + * possible, however, to apply a custom scheme or not to use configurations at all. + *

The library does require that a configuration scheme is chosen - in beans.xml as described below, but the library + * does NOT impose any mandatory parameters in order to initialize. The library does know of certain parameters, + * if it encounters them. * - *

Following classes can be configured: Pz2Service (controller), Pz2Client, and ServiceProxyClient. Some currently - * acknowledged parameters are TYPE (service type) PAZPAR2_URL, SERVICE_ID, and SERVICE_PROXY_URL

+ *

Following classes can be configured: Pz2Service (the controller), Pz2Client, and ServiceProxyClient. Some currently + * acknowledged parameters are TYPE (service type) PAZPAR2_URL, SERVICE_ID (see Pazpar2 documentation for an explanation of + * service id), and SERVICE_PROXY_URL

* *

Selecting a configuration scheme

* *

The built-in configuration schemes are:

*
    - *
  1. Configuration by context parameters in web.xml, this is the simple though less flexible choice
  2. + *
  3. Configuration by context parameters in web.xml, this is the simple albeit less flexible choice
  4. *
  5. The configuration scheme Index Data uses for other MasterKey applications, Mk2Config, this is the more versatile option
  6. *
* @@ -39,9 +40,8 @@ * *

Configuring the service using web.xml only

* - *

For the web.xml configuration scheme (choosing WebXmlConfigReader in beans.xml) - * to pre-define the URL of the Pazpar2 to use and choose Pazpar2 as the selected - * service type, the configuration could be:

+ *

Using the web.xml configuration scheme (choosing WebXmlConfigReader in beans.xml) + * you can configure you application to use a locally installed Pazpar2 server like this:

* *
  *  <context-param>
@@ -55,6 +55,21 @@
  *  </context-param>
  * 
* + * Likewise you could configure your application to use our hosted Pazpar2 service with these settings: + * + *
+ *  <context-param>
+ *   <param-name>SERVICE_PROXY_URL</param-name>
+ *   <param-value>http://mkc.indexdata.com:9009/service-proxy/</param-value>
+ *  </context-param>
+ *  <context-param>
+ *   <description>Service type. Possible values: SP, PZ2, TBD</description>
+ *   <param-name>TYPE</param-name>
+ *   <param-value>SP</param-value>  
+ *  </context-param>
+ * 
+ * + * *

Configuring the service using 'Mk2Config' scheme

* *

The Mk2ConfigReader scheme allows the configuration to exist outside of the web application archive. @@ -95,7 +110,10 @@ *

The jsfdemo.properties file might look like this for running against a * local Pazpar2 service:

* - * pz2client.PAZPAR2_URL = http://localhost:8004/ + *
+ * service.TYPE = pz2
+ * pz2client.PAZPAR2_URL = http://localhost:8004/
+ * 
* *

Some of the other known parameters in this format could be:

* -- 1.7.10.4