...
Table of Contents | ||
---|---|---|
|
fcrepo-webapp
Fedora Fedora RESTful HTTP API uses the open source Jersey RESTful Web Services framework that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation. The jersey servlet dispatcher is configured in The jersey servlet dispatcher is configured in web.xml as as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
<servlet> <servlet-name>jersey-servlet</servlet-name> <servlet-class>comclass>org.sunglassfish.jersey.spi.spring.container.servlet.SpringServlet<ServletContainer</servlet-class> <init-param> <param-name>comname>javax.sunws.jersey.config.property.packages<rs.Application</param-name> <param-value>org.fcrepo</param-value> </init-param> <init-param> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name> <param-value>true<fcrepo.http.commons.FedoraApplication</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> |
...
The following spring files exist in a directory as configured in web.xml, which contains a context-param element with param-name "contextConfigLocation". The param-value points to your a spring context configuration files, file "WEB-INF/classes/*spring/repository.xml". This configuration file imports a settings file located in the same directory or the file specified by system property {{fcrepo.spring.configuration}}. Note that these files are in the source tree under fcrepo-webapp/src/main/resources/spring and copied to WEB-INF/classes upon build.
fcrepo-webapp/src/main/resources/spring
...
repository.xml
- here you can specify the repository.json file to be loaded as the repositoryConfiguration, as well as the bean for repository factory and metricsthis imports all the settings from either the file specified in the system property
fcrepo.spring.configuration
or the provided configuration filefcrepo-config.xml
Code Block | ||||
---|---|---|---|---|
| ||||
<bean name "modeshapeRepofactory" class= "org.fcrepo.kernel.spring.ModeshapeRepositoryFactoryBean"> <property name="repositoryConfiguration" value <!-- Master context for fcrepo4. --> <import resource="${fcrepo.modeshapespring.configuration:classpath:/config/single/repository.jsonspring/fcrepo-config.xml}"/> </bean> |
...
fcrepo-config.xml
This is where you configure your Fedora instance, including:
- specify the repository.json file to be loaded as the repositoryConfiguration or use the
fcrepo.modeshape.configuration
system property. - bean for repository factory and metrics
- bean implementation for InternalIdentifierConverter (identifier translationChain), StoragePolicyDecisionPointImpl, SessionFactory, and base-packages to auto scan into spring
eventing.xml
- bean implementation for eventing - observer, filter, event bus
...
- here you can specify the implementation for processing events
transactions.xml
- Specify the config for transactions
minter.xml
...
- config for transactions
- bean implementation for minting identifiers
It is recommended to use the provided fcrepo-config.xml as a starting point for your customization.
fcrepo4/fcrepo-configs/src/main/resources/config
...