From 3e2b97f93b50f061ff802f940230d9a875e9657c Mon Sep 17 00:00:00 2001 From: Pascal-Nicolas Becker Date: Tue, 8 Dec 2015 18:25:39 +0100 Subject: [PATCH] IdentifierServiceImpl.reserve(ctx, dso) should mint and reserve --- .../java/org/dspace/identifier/IdentifierServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dspace-api/src/main/java/org/dspace/identifier/IdentifierServiceImpl.java b/dspace-api/src/main/java/org/dspace/identifier/IdentifierServiceImpl.java index a9693c1139..3fc049f584 100644 --- a/dspace-api/src/main/java/org/dspace/identifier/IdentifierServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/identifier/IdentifierServiceImpl.java @@ -21,6 +21,7 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.StringUtils; +import org.dspace.core.Constants; /** * The main service class used to reserve, register and resolve identifiers @@ -67,7 +68,11 @@ public class IdentifierServiceImpl implements IdentifierService { public void reserve(Context context, DSpaceObject dso) throws AuthorizeException, SQLException, IdentifierException { for (IdentifierProvider service : providers) { - service.mint(context, dso); + String identifier = service.mint(context, dso); + if (!StringUtils.isEmpty(identifier)) + { + service.reserve(context, dso, identifier); + } } //Update our item contentServiceFactory.getDSpaceObjectService(dso).update(context, dso);