<?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:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">

    <bean id="startWorkflowEventsForCostsheet" class="java.util.ArrayList">
        <constructor-arg>
            <list>
                <value>com.armedia.acm.costsheet.submit</value>
            </list>
        </constructor-arg>
    </bean>

    <bean id="acmCostsheetDao" class="com.armedia.acm.services.costsheet.dao.AcmCostsheetDao"/>

    <bean id="acmCostDao" class="com.armedia.acm.services.costsheet.dao.AcmCostDao"/>

    <bean id="costsheetService" class="com.armedia.acm.services.costsheet.service.CostsheetServiceImpl">
        <property name="acmCostsheetDao" ref="acmCostsheetDao"/>
        <property name="submissionStatusesMap">
            <map>
                <entry key="Save" value="DRAFT"/>
                <entry key="SaveFinal" value="FINAL"/>
                <entry key="Submit" value="IN_APPROVAL"/>
            </map>
        </property>
        <property name="executeSolrQuery" ref="executeSolrQuery"/>
        <property name="startWorkflowEvents" ref="startWorkflowEventsForCostsheet"/>
        <property name="pipelineManager" ref="costsheetPipelineManager"/>
    </bean>

    <bean id="costsheetEventPublisher" class="com.armedia.acm.services.costsheet.service.CostsheetEventPublisher"/>

    <bean id="costsheetAssociatedEventPublisher" class="com.armedia.acm.services.costsheet.service.CostsheetAssociatedEventPublisher"/>

    <bean id="costsheetWorkflowListener" class="com.armedia.acm.services.costsheet.service.CostsheetWorkflowListener">
        <property name="fileWorkflowBusinessRule" ref="fileWorkflowBusinessRule"/>
        <property name="taskDao" ref="acmTaskDao"/>
        <property name="costsheetConfig" ref="costsheetConfig"/>
    </bean>

    <bean id="costsheetHistoryEventListener" class="com.armedia.acm.services.costsheet.service.CostsheetHistoryEventListener">
        <property name="acmDataService" ref="acmDataService"/>
        <property name="costsheetAssociatedEventPublisher" ref="costsheetAssociatedEventPublisher"/>
    </bean>

    <bean id="costsheetToSolrTransformer" class="com.armedia.acm.services.costsheet.service.CostsheetToSolrTransformer">
        <property name="acmCostsheetDao" ref="acmCostsheetDao"/>
    </bean>

    <bean id="acmCostsheetPlugin" class="com.armedia.acm.pluginmanager.model.AcmPlugin">
        <property name="pluginName" value="Cost Tracking Service Plugin"/>
        <property name="configurationPropertyService" ref="configurationPropertyService"/>
    </bean>

    <bean id="costsheetConfigurationService" class="com.armedia.acm.services.costsheet.service.CostsheetConfigurationService">
        <property name="configurationPropertyService" ref="configurationPropertyService"/>
        <property name="costsheetConfig" ref="costsheetConfig"/>
    </bean>

    <bean id="costsheetConfig" class="com.armedia.acm.services.costsheet.model.CostsheetConfig" scope="refresh">
        <aop:scoped-proxy/>
    </bean>
</beans>