Table of Contents |
---|
Fedora Commons v. 3.5 Spring Configuration
Fedora 3.5 begins shifting the management and configuration of modules and components from the legacy Fedora Configuration syntax (.fcfg files) to the Spring 3 Framework. In this transitional release, Fedora will parse the modules and datasources in the fcfg as bean definitions, and then attempt to load all xml files in the spring configuration subdirectory as xml bean definitions. Bean definitions in this subdirectory will override fcfg configurations.
On this page:
Table of Contents |
---|
Configuring Modules
In the transition of 3.5, the interface of a module (also called the "role" in .fcfg files) is the name/id by which the module bean will be requested from the application context. Thus, if you are configuring the DOManager as a bean, you may write the following configuration to use the default implementation as a Spring bean:
...
Code Block |
---|
<bean id="org.fcrepo.server.storage.DOManagerConfiguration" name="org.fcrepo.server.storage.DOManagerConfiguration" class="org.fcrepo.server.config.ModuleConfiguration" autowire-candidate="true"> <constructor-arg index="0"> <list> <bean> <constructor-arg type="java.lang.String" value="pidNamespace" /> <property name="value" value="changeme" /> </bean> <bean> <constructor-arg type="java.lang.String" value="storagePool" /> <property name="value" value="localDerbyPool" /> </bean> <bean> <constructor-arg type="java.lang.String" value="storageCharacterEncoding" /> <property name="value" value="UTF-8" /> </bean> <bean> <constructor-arg type="java.lang.String" value="defaultExportFormat" /> <property name="value" value="info:fedora/fedora-system:FOXML-1.1" /> </bean> <bean> <constructor-arg type="java.lang.String" value="gSearchRESTURL" /> <property name="value" value="http://localhost:8080/fedoragsearch/rest" /> </bean> <bean> <constructor-arg type="java.lang.String" value="gSearchUsername" /> <property name="value" value="exampleUsername" /> </bean> <bean> <constructor-arg type="java.lang.String" value="gSearchPassword" /> <property name="value" value="examplePassword" /> </bean> </list> </constructor-arg> <constructor-arg index="1" type="java.lang.String" value="org.fcrepo.server.storage.DOManager" /> <constructor-arg index="2" type="java.lang.String" value="org.fcrepo.server.storage.DefaultDOManager" /> <constructor-arg index="3" type="java.lang.String" value="The interface to the storage subsystem." /> </bean> |
foo
Newly Configurable Components
TripleGenerator
When objects are created (or purged) in Fedora with the Resource Index enables, Fedora uses a TripleGenerator to determine which triples should be added or deleted from the index. In version 3.5, this component is configurable in Spring. Editing this configuration allows the addition of new content model-to-generator mappings for the default triple generator, org.fcrepo.server.resourceIndex.ModelBasedTripleGenerator.
AttributeFinderModule
Beginning with version 3.5, the PolicyEnforcementPoint is configurable in Spring, allowing the configuration of new/additional AttributeFinderModules to support your XACML policy decisions.
Rebuilders
In version 3.5, the code that rebuilds Fedora's SQL database and Resource Index will look for all beans in the Spring context that implement org.fcrepo.server.utilities.rebuild.Rebuilder, and include them in its menu of rebuild options.
TriplestoreConnector
Version 3.5 includes changes designed to allow more flexible configuration of TriplestoreConnectors.