diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/org/ssdt_ohio/devel/forms/services/QaModule.java	Mon Nov 12 16:29:11 2012 +0000
@@ -0,0 +1,43 @@
+package org.ssdt_ohio.devel.forms.services;
+
+import java.io.IOException;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.ioc.MappedConfiguration;
+import org.apache.tapestry5.ioc.OrderedConfiguration;
+import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.ioc.annotations.Local;
+import org.apache.tapestry5.services.Request;
+import org.apache.tapestry5.services.RequestFilter;
+import org.apache.tapestry5.services.RequestHandler;
+import org.apache.tapestry5.services.Response;
+import org.slf4j.Logger;
+
+/**
+ * This module is automatically included as part of the Tapestry IoC Registry if <em>tapestry.execution-mode</em>
+ * includes <code>qa</code> ("quality assurance").
+ */
+public class QaModule
+{
+    public static void bind(ServiceBinder binder)
+    {
+        // Bind any services needed by the QA team to produce their reports
+        // binder.bind(MyServiceMonitorInterface.class, MyServiceMonitorImpl.class);
+    }
+
+
+    public static void contributeApplicationDefaults(
+            MappedConfiguration<String, Object> configuration)
+    {
+        // The factory default is true but during the early stages of an application
+        // overriding to false is a good idea. In addition, this is often overridden
+        // on the command line as -Dtapestry.production-mode=false
+        configuration.add(SymbolConstants.PRODUCTION_MODE, false);
+
+        // The application version number is incorprated into URLs for some
+        // assets. Web browsers will cache assets because of the far future expires
+        // header. If existing assets are changed, the version number should also
+        // change, to force the browser to download new versions.
+        configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT-QA");
+    }
+}