// Path: src/main/java/de/onyxbits/tradetrax/main/AppConstants.java
// public class AppConstants {
// 
// 	/**
// 	 * The human readable version name without any prefixes (e.g. "v") or suffixes
// 	 * (e.g. "-SNAPSHOT-DEV")
// 	 */
// 	public static final String VERSION;
// 
// 	/**
// 	 * Init Parameter Name "Ledger": the parameter name by which to configure the
// 	 * ledger path in web.xml
// 	 */
// 	public static final String IPNLEDGERPATH = "ledger";
// 
// 	static {
// 		String tmp = "UNKNOWN";
// 		try {
// 			// TODO: Ideally this would somehow come from pom.xml, but there doesn't
// 			// seem to be a good way to transport it from there that works for the JAR
// 			// as well as the WAR version.
// 			tmp = "1.6";
// 		}
// 		catch (Exception e) {
// 		}
// 		VERSION = tmp;
// 	}
// }


import java.io.File;
import org.apache.tapestry5.*;
import org.apache.tapestry5.hibernate.HibernateConfigurer;
import org.apache.tapestry5.hibernate.HibernateSymbols;
import org.apache.tapestry5.ioc.MappedConfiguration;
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.ServiceBinder;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.ApplicationGlobals;
import de.onyxbits.tradetrax.main.AppConstants;
package de.onyxbits.tradetrax.services;




/**
 * This module is automatically included as part of the Tapestry IoC Registry,
 * it's a good place to configure and extend Tapestry, or to place your own
 * service definitions.
 */
public class AppModule {
	public static void bind(ServiceBinder binder) {
		// binder.bind(MyServiceInterface.class, MyServiceImpl.class);

		// Make bind() calls on the binder object to define most IoC services.
		// Use service builder methods (example below) when the implementation
		// is provided inline, or requires more initialization than simply
		// invoking the constructor.
		binder.bind(SettingsStore.class);
		binder.bind(EventLogger.class);
		binder.bind(MoneyRepresentation.class);
	}

	public static void contributeFactoryDefaults(MappedConfiguration<String, Object> configuration) {
		// 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. This overrides
		// Tapesty's default
		// (a random hexadecimal number), but may be further overriden by
		// DevelopmentModule or
		// QaModule.
// Path: src/main/java/de/onyxbits/tradetrax/main/AppConstants.java
// public class AppConstants {
// 
// 	/**
// 	 * The human readable version name without any prefixes (e.g. "v") or suffixes
// 	 * (e.g. "-SNAPSHOT-DEV")
// 	 */
// 	public static final String VERSION;
// 
// 	/**
// 	 * Init Parameter Name "Ledger": the parameter name by which to configure the
// 	 * ledger path in web.xml
// 	 */
// 	public static final String IPNLEDGERPATH = "ledger";
// 
// 	static {
// 		String tmp = "UNKNOWN";
// 		try {
// 			// TODO: Ideally this would somehow come from pom.xml, but there doesn't
// 			// seem to be a good way to transport it from there that works for the JAR
// 			// as well as the WAR version.
// 			tmp = "1.6";
// 		}
// 		catch (Exception e) {
// 		}
// 		VERSION = tmp;
// 	}
// }


// Path: src/main/java/de/onyxbits/tradetrax/services/AppModule.java
import java.io.File;
import org.apache.tapestry5.*;
import org.apache.tapestry5.hibernate.HibernateConfigurer;
import org.apache.tapestry5.hibernate.HibernateSymbols;
import org.apache.tapestry5.ioc.MappedConfiguration;
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.ServiceBinder;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.ApplicationGlobals;
import de.onyxbits.tradetrax.main.AppConstants;

package de.onyxbits.tradetrax.services;




/**
 * This module is automatically included as part of the Tapestry IoC Registry,
 * it's a good place to configure and extend Tapestry, or to place your own
 * service definitions.
 */
public class AppModule {
	public static void bind(ServiceBinder binder) {
		// binder.bind(MyServiceInterface.class, MyServiceImpl.class);

		// Make bind() calls on the binder object to define most IoC services.
		// Use service builder methods (example below) when the implementation
		// is provided inline, or requires more initialization than simply
		// invoking the constructor.
		binder.bind(SettingsStore.class);
		binder.bind(EventLogger.class);
		binder.bind(MoneyRepresentation.class);
	}

	public static void contributeFactoryDefaults(MappedConfiguration<String, Object> configuration) {
		// 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. This overrides
		// Tapesty's default
		// (a random hexadecimal number), but may be further overriden by
		// DevelopmentModule or
		// QaModule.
		configuration.override(SymbolConstants.APPLICATION_VERSION, "v"+AppConstants.VERSION);