<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <!-- File/folder specific service -->

   <bean name="fileFolderService" class="org.alfresco.repo.model.filefolder.FileFolderServiceImpl" init-method="init">
      <property name="namespaceService"><ref bean="namespaceService" /></property>
      <property name="dictionaryService"><ref bean="dictionaryService" /></property>
      <property name="nodeService"><ref bean="nodeService" /></property>
      <property name="copyService"><ref bean="copyService" /></property>
      <property name="searchService"><ref bean="admSearchService" /></property>
      <property name="contentService"><ref bean="contentService" /></property>
      <property name="mimetypeService"><ref bean="mimetypeService" /></property>

      <property name="systemNamespaces">
         <list>
            <value>http://www.alfresco.org/model/application/1.0</value>
            <value>http://www.alfresco.org/model/site/1.0</value>
         </list>
      </property>
      <property name="systemPaths">
         <list>
            <value>/${spaces.company_home.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.rss.childname}</value>
            <value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.scripts.childname}</value>
         </list>
      </property>
   </bean>

   <bean id="mlTranslationInterceptor" class="org.alfresco.repo.model.filefolder.MLTranslationInterceptor" >
      <property name="nodeService">
         <ref bean="nodeService"/>
      </property>
      <property name="multilingualContentService">
         <ref bean="multilingualContentService"/>
      </property>
      <property name="fileFolderService">
         <ref bean="fileFolderService"/>
      </property>
   </bean>

  <bean id="mlContentInterceptor" class="org.alfresco.repo.model.ml.MLContentInterceptor" >
      <property name="nodeService">
         <ref bean="nodeService"/>
      </property>
      <property name="contentService">
         <ref bean="contentService"/>
      </property>
      <property name="multilingualContentService">
         <ref bean="multilingualContentService"/>
      </property>
   </bean>


   <bean name="tempFileMarkerInterceptor" class="org.alfresco.repo.model.filefolder.TempFileMarkerInterceptor">
      <property name="nodeService">
         <ref bean="nodeService" />
      </property>
      <property name="filterRegularExpressions">
         <list>
            <value><![CDATA[.*\.tmp]]></value>
            <value><![CDATA[.*\.temp]]></value>
            <value><![CDATA[.*\.wbk]]></value>
            <value><![CDATA[\~.*]]></value>
         </list>
      </property>
   </bean>

  <!-- Multilingual specific service -->
   <bean name="multilingualContentService" class="org.alfresco.repo.model.ml.MultilingualContentServiceImpl" >
      <property name="nodeService">
         <ref bean="mlAwareNodeService" />
      </property>
      <property name="permissionService">
         <ref bean="permissionService" />
      </property>
      <property name="contentFilterLanguagesService">
         <ref bean="contentFilterLanguagesService" />
      </property>
      <property name="fileFolderService">
         <ref bean="fileFolderService" />
      </property>
      <property name="versionService">
         <ref bean="versionService" />
      </property>
      <property name="policyBehaviourFilter">
         <ref bean="policyBehaviourFilter" />
      </property>
   </bean>

   <!-- Edition service -->
   <bean name="editionService" class="org.alfresco.repo.model.ml.EditionServiceImpl" >
      <property name="nodeService">
         <ref bean="nodeService" />
      </property>
      <property name="versionService">
         <ref bean="versionService" />
      </property>
      <property name="multilingualContentService">
         <ref bean="multilingualContentService" />
      </property>
      <property name="versionNodeService">
         <ref bean="versionNodeService" />
      </property>
      <property name="policyBehaviourFilter">
         <ref bean="policyBehaviourFilter" />
      </property>
      <property name="nodeArchiveService">
         <ref bean="nodeArchiveService" />
      </property>
      <property name="fileFolderService">
         <ref bean="fileFolderService" />
      </property>
   </bean>

   <bean id="ImapService" class="org.alfresco.repo.management.subsystems.SubsystemProxyFactory">
     <property name="sourceApplicationContextFactory">
        <ref bean="imap" />
     </property>
      <property name="sourceBeanName">
          <value>ImapService</value>
      </property>
     <property name="interfaces">
        <list>
           <value>org.alfresco.repo.imap.ImapService</value>
        </list>
     </property>
  </bean>

</beans>
