<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

		<!-- Shipping pre-processors -->
		<util:list id="shippingModulePreProcessors" value-type="com.salesmanager.core.business.modules.integration.shipping.model.ShippingQuotePrePostProcessModule">
			<!-- Not configured by default, should know what is your intention before enabling -->
<!-- 		<ref bean="shippingDistancePreProcessor"/>
			<ref bean="shippingMethodDecisionProcess"/> -->
		</util:list>
	
		<!-- Calculates the distance between the origin and destination -->
		<!-- shipping-distance-processor project -->
		<bean id="shippingDistancePreProcessor"
			class="com.shopizer.modules.shipping.distance.ShippingDistancePreProcessorImpl">
			<!-- Google API key -->
			<property name="apiKey" value="YOUR_KEY_HERE"/>
			<property name="allowedZonesCodes" ref="acceptedZones"/>
		</bean>
		
		
		<!-- Decides dynamicaly which method is used based on a decision table-->
		<bean id="shippingMethodDecisionProcess"
			class="com.salesmanager.core.business.modules.integration.shipping.impl.ShippingDecisionPreProcessorImpl">
		</bean>
		
		<!-- Any post process required after getting a quote -->
		<!-- Shipping post-processors -->
		<util:list id="shippingModulePostProcessors" value-type="com.salesmanager.core.business.modules.integration.shipping.model.ShippingQuotePrePostProcessModule">
			<!-- Not configured by default, should be configured to be used -->
			<!-- <ref bean="storePickUp"/> --><!-- defined in core-modules -->
		</util:list>
		
		<!-- List of accepted zones for using shipping distance pre processor -->
		<util:list id="acceptedZones" value-type="java.lang.String">
			<value>NY</value>
			<value>NJ</value>
    	</util:list>
	
</beans>