Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated for consolidated config

...

Table of Contents
stylesquare

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
languagexml
titleweb.xml
<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</param-value>
	    <param-value>org.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/*.xmlrepository.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 file fcrepo-config.xml
Code Block
languagexml
titlerepo.xml
<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>

rest.xml

...

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

...

  • 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

  • bean implementation for minting identifiersconfig 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

...