Skip to content

Commit

Permalink
fix: add default HandleIdentifierProvider for disabled versioning
Browse files Browse the repository at this point in the history
Setting versioning.enabled = false in versioning.cfg is not enough to
disable versioning. It is also required to replace the bean class
VersionedHandleIdentifierProvider with a HandleIdentifierProvider
in identifier-service.xml. I've added one that is commented out as by
default versioning is enabled.
  • Loading branch information
mirkoscherf committed Jul 27, 2023
1 parent e8d78a5 commit 92c38de
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dspace/config/spring/api/identifier-service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<!-- Identifier Service Application Interface. Will be autowired with
<!-- Identifier Service Application Interface. Will be autowired with
any Identifier Providers present in Spring context.
-->
<bean id="org.dspace.identifier.service.IdentifierService"
class="org.dspace.identifier.IdentifierServiceImpl"
autowire="byType"
scope="singleton"/>

<!-- If you disable versioning, you need to use the default HandleIdentifierProvider. -->
<!--
<bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.HandleIdentifierProvider" scope="singleton">
<property name="configurationService" ref="org.dspace.services.ConfigurationService"/>
</bean>
-->

<!-- If you enabled versioning, you should use one of the versioned
handle identifier provider instead of the default one.
The VersionedHandleIdentifierProvider creates a new versioned
Expand All @@ -26,7 +33,7 @@
a new version is created the previous version gets a new
handle. This leads to a handle that points always to the
newest version, but there is no permanent handle, that
will always keep pointing to the acutal newest one.
will always keep pointing to the actual newest one.
-->
<!--
<bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.VersionedHandleIdentifierProviderWithCanonicalHandles" scope="singleton">
Expand Down

0 comments on commit 92c38de

Please sign in to comment.