annotate src/main/java/org/ssdt_ohio/devel/forms/services/QaModule.java @ 0:f4f8570d1c56

initial OTP form
author smith@nwoca.org
date Mon, 12 Nov 2012 16:29:11 +0000
parents
children
rev   line source
0
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
1 package org.ssdt_ohio.devel.forms.services;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
2
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
3 import java.io.IOException;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
4
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
5 import org.apache.tapestry5.*;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
6 import org.apache.tapestry5.ioc.MappedConfiguration;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
7 import org.apache.tapestry5.ioc.OrderedConfiguration;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
8 import org.apache.tapestry5.ioc.ServiceBinder;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
9 import org.apache.tapestry5.ioc.annotations.Local;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
10 import org.apache.tapestry5.services.Request;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
11 import org.apache.tapestry5.services.RequestFilter;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
12 import org.apache.tapestry5.services.RequestHandler;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
13 import org.apache.tapestry5.services.Response;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
14 import org.slf4j.Logger;
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
15
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
16 /**
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
17 * This module is automatically included as part of the Tapestry IoC Registry if <em>tapestry.execution-mode</em>
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
18 * includes <code>qa</code> ("quality assurance").
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
19 */
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
20 public class QaModule
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
21 {
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
22 public static void bind(ServiceBinder binder)
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
23 {
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
24 // Bind any services needed by the QA team to produce their reports
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
25 // binder.bind(MyServiceMonitorInterface.class, MyServiceMonitorImpl.class);
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
26 }
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
27
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
28
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
29 public static void contributeApplicationDefaults(
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
30 MappedConfiguration<String, Object> configuration)
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
31 {
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
32 // The factory default is true but during the early stages of an application
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
33 // overriding to false is a good idea. In addition, this is often overridden
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
34 // on the command line as -Dtapestry.production-mode=false
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
35 configuration.add(SymbolConstants.PRODUCTION_MODE, false);
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
36
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
37 // The application version number is incorprated into URLs for some
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
38 // assets. Web browsers will cache assets because of the far future expires
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
39 // header. If existing assets are changed, the version number should also
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
40 // change, to force the browser to download new versions.
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
41 configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT-QA");
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
42 }
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
43 }