<?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="caseFileFactory" class="com.armedia.acm.form.casefile.service.CaseFileFactory">
        <property name="acmHistoryDao" ref="acmHistoryDao"/>
        <property name="objectAssociationDao" ref="objectAssociationDao"/>
        <property name="ecmFileDao" ref="ecmFileDao"/>
        <property name="ecmFileService" ref="ecmFileService"/>
        <property name="userDao" ref="userJpaDao"/>
        <property name="acmParticipantDao" ref="acmParticipantDao"/>
        <property name="personDao" ref="acmPersonDao"/>
        <property name="personAssociationDao" ref="acmPersonAssociationDao"/>
    </bean>

    <bean id="caseFileService" class="com.armedia.acm.form.casefile.service.CaseFileService" parent="frevvoFormService" scope="prototype">
        <property name="caseFileFactory" ref="caseFileFactory"/>
        <property name="saveCaseService" ref="saveCaseService"/>
        <property name="acmHistoryDao" ref="acmHistoryDao"/>
        <property name="caseFileDao" ref="caseFileDao"/>
        <property name="identificationDao" ref="acmIdentificationDao"/>
        <property name="activitiRuntimeService" ref="activitiRuntimeService"/>
        <property name="fileWorkflowBusinessRule" ref="fileWorkflowBusinessRule"/>
        <property name="caseFileEventUtility" ref="caseFileEventUtility"/>
        <property name="caseFolderNameFormat" value="Case (%s)"/>
    </bean>

    <bean id="caseFileUpdatedListener" class="com.armedia.acm.form.casefile.service.CaseFileUpdatedListener">
        <property name="formsTypeCheckService" ref="formsTypeCheckService"/>
        <lookup-method name="getCaseFileService" bean="caseFileService"/>
        <property name="formConfig" ref="caseFileFormConfig"/>
    </bean>

    <bean id="caseFileFormConfig" class="com.armedia.acm.form.casefile.model.CaseFileFormConfig" scope="refresh">
        <aop:scoped-proxy/>
    </bean>

</beans>