<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
          "http://struts.apache.org/dtds/struts-config_1_3.dtd">
          
<!-- Descriptions: This file contains specific struts components for an ee module
	History: Created 				10/20/2004	(DNS   lev)
		 Added CustomRequestProcessor		04/25/2005	Muddaiah Ranga
		 Plugged in Tiles			04/26/2005	Muddaiah ranga
-->	

<struts-config>
	
	<!-- ====================== Form Bean Definitions ======================= -->
	<form-beans>
		<form-bean name="eligibilityViewForm" type="gov.va.med.esr.ui.ee.action.EligibilityViewForm"/>
		<form-bean name="servicePeriodForm" type="gov.va.med.esr.ui.ee.action.ServicePeriodForm"/>
		<form-bean name="enrollmentForm" type="gov.va.med.esr.ui.ee.action.EnrollmentForm"/>
		<form-bean name="enrollmentHistoryForm" type="gov.va.med.esr.ui.ee.action.EnrollmentHistoryForm"/>
		<form-bean name="clinicalDeterForm" type="gov.va.med.esr.ui.ee.action.ClinicalDeterForm"/>
		<form-bean name="eligibilityEditReviewActionForm" type="gov.va.med.esr.ui.ee.action.EligibilityEditReviewActionForm"/>
		<form-bean name="eligibilityForm" type="gov.va.med.esr.ui.ee.action.EligibilityEditActionForm" />
		<form-bean name="purpleHeartForm" type="gov.va.med.esr.ui.ee.action.PurpleHeartForm" />
		<form-bean name="healthBenefitPlanForm"
			type="gov.va.med.esr.ui.ee.action.HealthBenefitPlanForm" />
		<form-bean name="vcDeterminationHistoryForm" type="gov.va.med.esr.common.model.comms.VCDeterminationHistoryForm"/>
			
	</form-beans>

	<!-- ===================================== Exception Handling Definitions  -->
	<global-exceptions>
	</global-exceptions>

	<!-- ===================================== Global forwards Definitions  -->
	<global-forwards>
    	</global-forwards>

	<!-- ====================== Action Bean Definitions ===================== -->
	<action-mappings type="gov.va.med.fw.ui.struts.ServiceBrokerActionMapping">

		<action path="/eligibilityView.display"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityViewForm"
			scope="request"
			validate="false"
			parameter="display">
			<forward name="success" path=".view.eligibility" />
	    	</action>
	    	


		<action path="/eligibilityHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="historyForm"
			scope="request"
			parameter="methodName">
			<forward name="history" path=".view.eligibilityHistory"/>
            <forward name="return" path="/eligibilityView.display.do" redirect="true"/>
			</action>
			
		<action path="/hbpHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="historyForm"
			scope="request"
			parameter="methodName">
			<forward name="history" path=".view.hbpHistory"/>
        	<!-- <forward name="return" path="/eligibilityView.display.do" redirect="true"/> -->
        	<forward name="return" path=".edit.healthBenefitPlan" redirect="true"/> 
			</action>
			
	<action path="/eligibilityView.vcDetermination"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityViewForm" scope="request"
			parameter="vcDetermination">
			<forward name="success" path=".view.vcDetermination"/>
            <forward name="return" path="/eligibilityView.display.do" redirect="true"/>
     </action>
			
		<action path="/eligibilityView.vcDeterminationHistory"
                type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
                name="vcDeterminationHistoryForm"
                scope="request"
                parameter="vcDeterminationHistory">
             <forward name="success" path=".view.vcDeterminationHistory" />
            <forward name="return" path=".view.vcDetermination" />
        </action>

	<action path="/powHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="historyForm"
			scope="request"
			parameter="methodName">
			<forward name="history" path=".view.powHistory"/>
            <forward name="return" path="/eligibilityView.display.do" redirect="true"/>
			</action>
			
	<action path="/healthBenefitPlan"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="healthBenefitPlanForm" scope="session"
			parameter="methodName">
			<forward name="editHealthBenefit" path=".edit.healthBenefitPlan" />
      		<forward name="cancel" path="/eligibilityView.display.do" redirect="true" />
			<forward name="displayUpdateMsg" 
				path="/eligibilityView.display.do?infoMessage=message.healthBenefitPlanUpdated" 
				redirect="true"/>		
     </action>	


				
    <action path="/enrollment"
      type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
      name="enrollmentForm"
      validate="true"
      input="display"
      parameter="methodName">
      <set-property property="validateOnMethod" value="update"/>
      <forward name="cancel" path="/overview.do" module ="/admin" redirect="true" />
      <forward name="success" path="/overview.do?infoMessage=message.enrollmentUpdateSuccess" module ="/admin"  redirect="true"/>
      <forward name="display" path=".view.enrollment"/>
      <forward name="noDataChanged" path="/overview.do?infoMessage=message.dataNotChanged" module ="/admin" redirect="true"/>
    </action>

    <action path="/enrollmentHistory"
      type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
      name="historyForm"
      scope="request"
      parameter="methodName">
      <forward name="history" path=".view.enrollmentHistory"/>
      <forward name="return" path="/enrollment.do?methodName=DISPLAY" redirect="true"/>
    </action>

		<action path="/eligibilityView.redisplay"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityViewForm"
			scope="request"
			validate="false"
			parameter="redisplay">
			<forward name="success" path=".view.eligibility" />
	    	</action>

		<action path="/eligibilityView.forward.display" forward=".view.eligibility" />

		<action path="/eligibilityView.displayClinicalDeter"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityViewForm"
			scope="request"
			validate="false"
			parameter="displayClinicalDeter">
			<forward name="success" path="/clinicalDeter.display.do" />
	    	</action>

		<action path="/clinicalDeterminationHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="historyForm"
			scope="request"
			parameter="methodName">
			<forward name="history" path=".view.clinicalDeterminationHistory"/>
            <forward name="return" path="/eligibilityView.displayClinicalDeter.do" redirect="true"/>
			</action>

		<action path="/retiredCDHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="historyForm"
			scope="request"
			parameter="methodName">
			<forward name="history" path=".view.retiredCDHistory"/>
            <forward name="return" path="/eligibilityView.displayClinicalDeter.do" redirect="true"/>
       	</action>

		<action path="/clinicalDeter.display"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="clinicalDeterForm"
			scope="request"
			validate="false"
			parameter="display">
			<forward name="success" path=".view.eligibility.clinicalDeter" />
	    </action>

	    <action path="/eligibilityEdit"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityForm"
			scope="session"
			validate="true"
			input="failure"
			parameter="methodName">
			<set-property property="validateOnMethod" value="preview, acceptChanges"/>
			<forward name="eligibilityEditReview" path="/eligibilityEditReview.display.do" />
			<forward name="servicePeriod" path="/gotoServicePeriod.do" />
			<forward name="acceptChanges" path="/eligibilityView.redisplay.do?infoMessage=message.eligibilityUpdated" />
			<forward name="cancel" path="/eligibilityView.display.do" />
			<forward name="addPow" path=".edit.eligibility" />
			<forward name="failure" path=".edit.eligibility"/>
			<forward name="addDisability" path=".edit.eligibility" />
            <forward name="updateVOAAttachments" path=".edit.eligibility" />
			<forward name="olerror" path="/eligibilityView.redisplay.do"/>
            <forward name="addVoaAttachmentsDocTypes" path="/eligibilityView.redisplay.do"/>
            <forward name="success" path=".edit.eligibility" />
			<forward name="noDataChanged" path="/eligibilityView.display.do?infoMessage=message.dataNotChanged"/>
     </action>

	     <action path="/gotoEligibilityEdit"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="eligibilityForm"
			scope="session"
			validate="false"
			parameter="methodName">
			<forward name="success" path=".edit.eligibility" />
            <forward name="displayDoc" path=".edit.eligibility.displayDoc" />
            <forward name="addVoaAttachmentsDocTypes" path=".edit.eligibility" />
		 </action>

	     <action path="/gotoServicePeriod"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="servicePeriodForm"
			scope="session"
			validate="false"
			parameter="display">
			<forward name="success" path=".edit.servicePeriod" />
		 </action>

	     <action path="/servicePeriod"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
			name="servicePeriodForm"
			scope="session"
			validate="true"
			input="failure"
			parameter="methodName">
			<set-property property="validateOnMethod" value="update"/>
			<forward name="eligibilityView" path="/eligibilityView.redisplay.do" />
			<forward name="cancel" path="/eligibilityView.display.do" />
			<forward name="failure" path=".edit.servicePeriod"/>
			<forward name="olerror" path="/eligibilityView.redisplay.do"/>
		 </action>

		 <action path="/eligibilityEditReview" 
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy" 
			name="eligibilityEditReviewActionForm" 
			scope="request" 
			input="failure"			
			parameter="methodName">
			<forward name="servicePeriod" path="/gotoServicePeriod.do" />
			<forward name="edit" path=".edit.eligibility" />
			<forward name="discardChanges" path="/gotoEligibilityEdit.do" />
			<forward name="view" path="/eligibilityView.redisplay.do" />
			<forward name="failure" path=".edit.eligibility"/>
			<forward name="olerror" path="/eligibilityView.redisplay.do"/>
	    	</action>	
		
		<action path="/eligibilityEditReview.display" 
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy" 
			name="eligibilityEditReviewActionForm" 
			scope="request" 
			parameter="methodName">
			<forward name="success" path=".edit.eligibility.review" />
		</action>
		
		<action path="/editPurpleHeart" 
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy" 
			name="purpleHeartForm" 
			scope="session" 			
			input="edit"
			validate="true"
			parameter="methodName">
			<set-property property="validateOnMethod" value="update"/>
			<forward name="edit" path=".purpleHeart.edit"/>
            <forward name="updateVOAAttachmentsPurpleHeart" path=".purpleHeart.edit" /> 
            <forward name="addVoaAttachmentsDocTypes" path=".purpleHeart.edit" />
            <forward name="openDocument" path=".purpleHeart.displayDoc" />
			<forward name="returnEditEligibility" path="/gotoEligibilityEdit.do?methodName=Edit" redirect="true"/>
			<forward name="cancel" path="/eligibilityView.display.do" redirect="true"/>
			<forward name="olerror" path="/eligibilityView.display.do"/>
			<forward name="displayUpdateMsg" 
				path="/eligibilityView.display.do?infoMessage=message.purpleHeartUpdated" 
				redirect="true"/>
			<forward name="displayDeleteMsg" 
				path="/eligibilityView.display.do?infoMessage=message.purpleHeartDeleted" 
				redirect="true"/>
			<forward name="displayAddMessage" 
				path="/eligibilityView.display.do?infoMessage=message.purpleHeartAdded" 
				redirect="true"/>
      <forward name="noDataChanged" path="/eligibilityView.display.do?infoMessage=message.dataNotChanged" redirect="true"/>
		</action>
		
		<action path="/purpleHeartHistory"
			type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy" 
			name="historyForm" 
			scope="request" 
			parameter="methodName">
			<forward name="history" path=".view.purpleHeartHistory"/>
            <forward name="return" path="/editPurpleHeart.do?methodName=DISPLAY" redirect="true"/>			
			</action>
		 
	</action-mappings>
	
	<!-- ===================================== Message Resources Definitions  -->
	<message-resources parameter="CommonMessages,WebHelpMessages,BreadCrumbMessages,RuleMessages,EEMessages,EEFieldMap" factory="gov.va.med.fw.ui.struts.CustomPropertyMessageResourcesFactory" />
	<message-resources key="ee" parameter="EEMessages" factory="gov.va.med.fw.ui.struts.CustomPropertyMessageResourcesFactory" />
	
	<!-- ====================== Plug Ins Configuration ====================== -->
	
	<!-- ========== TilesPlugin settings ===================================== -->
	<plug-in className="org.apache.struts.tiles.TilesPlugin" >
	    	<set-property property="definitions-config" value="/WEB-INF/edb_tiles-defs.xml,/WEB-INF/ee/tiles-defs.xml"/>
	    	<set-property property="moduleAware" value="true" />
    <set-property property="definitions-factory-class" value="gov.va.med.fw.ui.struts.CustomTilesFactorySet"/>
  	</plug-in>
  
	<!-- ========== ValidatorPlugin settings ===================================== -->
	<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
		<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/ee/validation.xml" />
	    <set-property property="stopOnFirstError" value="false" />
	</plug-in>
</struts-config>