xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
\r
- <bean id="jcrSession" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
- <property name="repository" ref="jcrRepository" />\r
+ <!-- JCR repositories -->\r
+ <bean id="javaRepository" parent="template.jcrRepository">\r
+ <property name="homeDirectory" value="${slc.repo.jcr.reposBase}/java" />\r
+ <property name="configuration" value="${slc.repo.jcr.configuration.java}" />\r
+ </bean>\r
+ <bean id="distRepository" parent="template.jcrRepository">\r
+ <property name="homeDirectory" value="${slc.repo.jcr.reposBase}/dist" />\r
+ <property name="configuration" value="${slc.repo.jcr.configuration.dist}" />\r
+ </bean>\r
+ <bean id="rpmRepository" parent="template.jcrRepository">\r
+ <property name="homeDirectory" value="${slc.repo.jcr.reposBase}/rpm" />\r
+ <property name="configuration" value="${slc.repo.jcr.configuration.rpm}" />\r
+ </bean>\r
+ <bean id="docsRepository" parent="template.jcrRepository">\r
+ <property name="homeDirectory" value="${slc.repo.jcr.reposBase}/docs" />\r
+ <property name="configuration" value="${slc.repo.jcr.configuration.docs}" />\r
+ </bean>\r
+\r
+ <!-- JCR authorizations -->\r
+ <bean parent="template.jcrAuthorizations">\r
+ <property name="repository" ref="javaRepository" />\r
+ </bean>\r
+ <bean parent="template.jcrAuthorizations">\r
+ <property name="repository" ref="distRepository" />\r
+ </bean>\r
+ <bean parent="template.jcrAuthorizations">\r
+ <property name="repository" ref="rpmRepository" />\r
+ </bean>\r
+ <bean parent="template.jcrAuthorizations">\r
+ <property name="repository" ref="docsRepository" />\r
+ </bean>\r
+\r
+ <bean\r
+ class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
+ <property name="authenticationManager" ref="authenticationManager" />\r
</bean>\r
\r
- <bean id="jcrRepository" class="org.argeo.jackrabbit.JackrabbitContainer"\r
- init-method="init" destroy-method="destroy">\r
- <property name="homeDirectory" value="${osgi.instance.area}/repos/java" />\r
- <property name="configuration" value="osgibundle:repository-h2.xml" />\r
+ <!-- Templates -->\r
+ <bean id="template.jcrRepository" abstract="true"\r
+ class="org.argeo.jackrabbit.JackrabbitContainer" init-method="init"\r
+ destroy-method="destroy">\r
<property name="variables" value="osgibundle:/repo.properties" />\r
<property name="cndFiles">\r
<list>\r
</list>\r
</property>\r
<property name="bundleContext" ref="bundleContext" />\r
- <property name="forceCndImport" value="${org.argeo.slc.repo.forceCndImport}" />\r
+ <property name="forceCndImport" value="${slc.repo.jcr.forceCndImport}" />\r
</bean>\r
\r
- <!-- Security -->\r
- <bean class="org.argeo.jackrabbit.JackrabbitAuthorizations"\r
- init-method="run">\r
+ <bean id="template.jcrAuthorizations" abstract="true"\r
+ class="org.argeo.jackrabbit.JackrabbitAuthorizations" init-method="run">\r
<property name="principalPrivileges">\r
<map>\r
<entry key="jcr:all" value="ROLE_SLC" />\r
- <entry key="jcr:all" value="ROLE_ADMIN" />\r
</map>\r
</property>\r
- <property name="repository" ref="jcrRepository" />\r
<property name="workspace" value="*" />\r
</bean>\r
\r
- <bean\r
- class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
- <property name="authenticationManager" ref="authenticationManager" />\r
- </bean>\r
+\r
</beans>
\ No newline at end of file