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.DOManager" name="org.fcrepo.server.storage.DOManager" class="org.fcrepo.server.storage.DefaultDOManager" destroy-method="shutdownModule" init-method="initModule" autowire-candidate="true" lazy-init="true"> <constructor-arg index="0"> <bean factory-bean="org.fcrepo.server.storage.DOManagerConfiguration" factory-method="getParameters" /> </constructor-arg> <constructor-arg index="1" ref="org.fcrepo.server.Server" /> <constructor-arg index="2"> <bean factory-bean="org.fcrepo.server.storage.DOManagerConfiguration" factory-method="getRole" /> </constructor-arg> </bean> {code} |
Take
...
care
...
to
...
write
...
and
...
configure
...
the
...
shutdown/destroy
...
methods
...
for
...
your
...
module
...
! Also note the configuration beans. It is a convention in 3.5
...
that
...
a
...
module
...
configuration
...
bean,
...
if
...
it
...
is
...
necessary,
...
will
...
be
...
named
...
(module
...
name)Configuration.
...
For example,
...
the
...
configuration
...
in
...
the
...
example
...
above,
...
for
...
org.fcrepo.server.storage.DOManager
...
, is org.fcrepo.server.storage.DOManagerConfiguration
...
. If you need such a configuration bean, you may use org.fcrepo.server.config.ModuleConfiguration bean to provide one like so:
Code Block |
---|
* bean to provide one like so: {code} <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> {code} {color:#ffffff}foo{color} h1. Required Bean Configurations As of the |
foo
Required Bean Configurations
As of the 3.5
...
release,
...
there
...
is
...
only
...
one
...
uniformly
...
required
...
bean
...
configuration:
...
The
...
org.trippi.io.TripleIteratorFactory
...
bean must be included,
...
with
...
a
...
destroy
...
method
...
mapped
...
to
...
"shutdown".
...
If your repository has the Resource Index enabled, then you will also need an org.fcrepo.server.resourceIndex.TripleGenerator
...
bean. Both of these beans are configured in $FEDORA_HOME/server/config/spring/triple-generator.xml,
...
which
...
is
...
present
...
by
...
default
...
if
...
you
...
have
...
run
...
the
...
installer.
...
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.
...
There is an example of this configuration in $FEDORA_HOME/server/config/spring/README.txt.
...
Spring
...
Application
...
Contexts
...
in
...
Fedora
...
3.5
...
In
...
Fedora
...
3.5,
...
there
...
are
...
two
...
"top
...
level"
...
application
...
contexts:
...
One
...
manages
...
the
...
Spring
...
components
...
supporting
...
the
...
FESL
...
authorization
...
(AuthZ)
...
filters,
...
and
...
the
...
other
...
is
...
the
...
Server
...
context
...
in
...
which
...
the
...
Fedora
...
modules
...
(and
...
other
...
beans
...
configured
...
in
...
$FEDORA_HOME
...
/server/config/spring
...
)
...
are
...
managed.
...
These contexts are currently planned to be joined in a future version of Fedora.