Guest User

content-store-selector-context.xml

a guest
Jul 22nd, 2015
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
  3.  
  4. <beans>
  5.  
  6.    <bean id="firstSharedFileContentStore" class="org.alfresco.repo.content.filestore.FileContentStore">
  7.       <constructor-arg>
  8.          <value>${dir.root}/storeA</value>
  9.       </constructor-arg>
  10.    </bean>
  11.  
  12.    <bean id="secondSharedFileContentStore" class="org.alfresco.repo.content.filestore.FileContentStore">
  13.       <constructor-arg>
  14.          <value>${dir.root}/storeB</value>
  15.       </constructor-arg>
  16.    </bean>
  17.  
  18.    <bean id="storeSelectorContentStore" parent="storeSelectorContentStoreBase">
  19.        <property name="defaultStoreName">
  20.             <value>default</value>
  21.        </property>
  22.        <property name="storesByName">
  23.            <map>
  24.                <entry key="default">
  25.                    <ref bean="fileContentStore" />
  26.                </entry>
  27.                <entry key="storeA">
  28.                    <ref bean="firstSharedFileContentStore" />
  29.                </entry>
  30.                <entry key="storeB">
  31.                    <ref bean="secondSharedFileContentStore" />
  32.                </entry>
  33.           </map>
  34.        </property>
  35.    </bean>
  36.  
  37. <!-- Point the ContentService to the 'selector' store -->
  38.    <bean id="contentService" parent="baseContentService">
  39.       <property name="store">
  40.          <ref bean="storeSelectorContentStore" />
  41.       </property>
  42.    </bean>
  43.  
  44.    <!-- Add the other stores to the list of stores for cleaning -->
  45.    <bean id="eagerContentStoreCleaner" class="org.alfresco.repo.content.cleanup.EagerContentStoreCleaner" init-method="init">
  46.       <property name="eagerOrphanCleanup" >
  47.          <value>${system.content.eagerOrphanCleanup}</value>
  48.       </property>
  49.       <property name="stores" >
  50.          <list>
  51.             <ref bean="fileContentStore" />
  52.             <ref bean="firstSharedFileContentStore" />
  53.             <ref bean="secondSharedFileContentStore" />
  54.          </list>
  55.       </property>
  56.       <property name="listeners" >
  57.          <ref bean="deletedContentBackupListeners" />
  58.       </property>
  59.    </bean>
  60.    
  61. </beans>
RAW Paste Data