Skip to content

Commit

Permalink
use spring resources to pass in the classpath/filepath to the modesha…
Browse files Browse the repository at this point in the history
…pe config
  • Loading branch information
cbeer committed Mar 7, 2013
1 parent 46fa184 commit 9525e5d
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 44 deletions.
10 changes: 4 additions & 6 deletions fcrepo-dc/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,15 +10,13 @@

<context:annotation-config/>

<bean name="modeshapeRepofactory" class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:my_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="my_repository.json"/>
</bean>

<bean class="org.fcrepo.services.ObjectService"/>

</beans>
9 changes: 4 additions & 5 deletions fcrepo-http-api/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,14 +10,13 @@

<context:annotation-config/>

<bean name="modeshapeRepofactory" class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:test_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="test_repository.json"/>
</bean>

<bean class="org.fcrepo.services.ObjectService"/>
<bean class="org.fcrepo.services.DatastreamService"/>
Expand Down
10 changes: 4 additions & 6 deletions fcrepo-jms/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,15 +10,13 @@

<context:annotation-config/>


<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:my_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="my_repository.json"/>
</bean>


</beans>
Expand Up @@ -5,6 +5,7 @@

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Qualifier;
import javax.jcr.RepositoryException;

import org.modeshape.jcr.JcrRepository;
Expand All @@ -20,8 +21,6 @@ public class ModeShapeRepositoryFactoryBean implements
@Inject
private JcrRepositoryFactory jcrRepositoryFactory;

@Inject
@ModeShapeRepositoryConfiguration
private Resource repositoryConfiguration;
private JcrRepository repository;

Expand All @@ -47,4 +46,7 @@ public boolean isSingleton() {
return true;
}

public void setRepositoryConfiguration(Resource repositoryConfiguration) {
this.repositoryConfiguration = repositoryConfiguration;
}
}
16 changes: 8 additions & 8 deletions fcrepo-kernel/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,17 +10,17 @@

<context:annotation-config/>


<context:property-placeholder/>

<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:test_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="test_repository.json"/>
</bean>
<bean class="org.fcrepo.services.ObjectService"/>
<bean class="org.fcrepo.services.DatastreamService"/>

<bean class="org.fcrepo.services.ObjectService"/>
<bean class="org.fcrepo.services.DatastreamService"/>

</beans>
10 changes: 4 additions & 6 deletions fcrepo-legacy-api/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,15 +10,13 @@

<context:annotation-config/>

<bean name="modeshapeRepofactory" class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:test_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="test_repository.json"/>
</bean>

<bean class="org.fcrepo.services.ObjectService"/>
<bean class="org.fcrepo.services.DatastreamService"/>

Expand Down
9 changes: 4 additions & 5 deletions fcrepo-rss/src/test/resources/spring-test/repo.xml
Expand Up @@ -10,15 +10,14 @@

<context:annotation-config/>


<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:test_repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="test_repository.json"/>
</bean>


</beans>
10 changes: 4 additions & 6 deletions fcrepo-webapp/src/main/resources/spring/repo.xml
Expand Up @@ -10,15 +10,13 @@

<context:annotation-config/>

<bean name="modeshapeRepofactory" class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/>
<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:/config/repository.json}"/>
</bean>

<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.springframework.core.io.ClassPathResource">
<qualifier type="ModeShapeRepositoryConfiguration"/>
<constructor-arg type="String" value="/config/repository.json"/>
</bean>

<bean class="org.fcrepo.services.ObjectService"/>
<bean class="org.fcrepo.services.DatastreamService"/>

Expand Down

0 comments on commit 9525e5d

Please sign in to comment.