<?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">
	
	<bean id="clinicalDataService" class="gov.va.med.cds.DefaultClinicalDatasServiceSynchronous">
		<property name="requestProcessor" ref="requestProcessor" />
	</bean>

	<bean id="requestProcessor"	class="gov.va.med.cds.request.TemplateRequestProcessor">
		<property name="delegatingClinicalDataServiceSynchronousInternal" ref="clinicalDataServiceSynchronousInternal" />
		<property name="templateHelper" ref="templateHelper" />
		<property name="filterManager" ref="filterManager" />
		<property name="vistaCreateTemplateIdsList" ref="vistaCreateTemplateIdsList" />
	</bean>

	<!--  At time of editing the template manger satisfied the following roles.
		These aliases create alias beans with the specified names to satisfy
		these roles. -->
	<alias name="templateManager" alias="requestValidator" />

	<alias name="templateManager" alias="responseValidator" />

	<alias name="templateManager" alias="templateMetaDataProvider" />

	<alias name="clinicalDataService" alias="clinicalDataServiceSynchronous" />

	<!-- This is for MBeans and exporting an MBean -->
	<bean id="responseValidatorMBeanExporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
		<property name="beans">
			<map>
				<entry key="gov.va.med.cds.request:name=cds-read-response-validator" value-ref="requestProcessor" />
			</map>
		</property>
		<property name="assembler">
			<bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
				<property name="interfaceMappings">
					<props>
						<prop key="gov.va.med.cds.request:name=cds-read-response-validator">
							gov.va.med.cds.request.ResponseValidatorMBeanInterface
						</prop>
					</props>
				</property>
			</bean>
		</property>
		<property name="server" ref="mbeanServer" />
		<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
	</bean>

	<util:list id="vistaCreateTemplateIdsList">
		<value>SensitivePatientAccessCreate1</value>	
	</util:list>
</beans>

