annotate src/main/java/org/ssdt_ohio/devel/forms/services/DevelopmentModule.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>development</code>.
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
19 */
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
20 public class DevelopmentModule
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 contributeApplicationDefaults(
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
23 MappedConfiguration<String, Object> configuration)
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
24 {
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
25 // The factory default is true but during the early stages of an application
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
26 // overriding to false is a good idea. In addition, this is often overridden
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
27 // on the command line as -Dtapestry.production-mode=false
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
28 configuration.add(SymbolConstants.PRODUCTION_MODE, false);
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
29
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
30 // The application version number is incorprated into URLs for some
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
31 // assets. Web browsers will cache assets because of the far future expires
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
32 // header. If existing assets are changed, the version number should also
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
33 // change, to force the browser to download new versions.
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
34 configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT-DEV");
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
35 }
f4f8570d1c56 initial OTP form
smith@nwoca.org
parents:
diff changeset
36 }