mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Bugfix: Renamed static final int in DOIIdentifierException.
Renamed DOIIdentifierException.REGISTER_FIRST to DOIIdentifierException.RESERVE_FIRST.
This commit is contained in:
@@ -348,7 +348,7 @@ public class DOIIdentifierProvider
|
||||
catch (DOIIdentifierException die)
|
||||
{
|
||||
// do we have to reserve DOI before we can register it?
|
||||
if (die.getCode() == DOIIdentifierException.REGISTER_FIRST)
|
||||
if (die.getCode() == DOIIdentifierException.RESERVE_FIRST)
|
||||
{
|
||||
this.reserveOnline(context, dso, identifier);
|
||||
connector.registerDOI(context, dso, doi);
|
||||
|
@@ -49,7 +49,7 @@ public class DOIIdentifierException extends IdentifierException {
|
||||
* be registered. This error code signals that a unreserved DOI should be
|
||||
* registered and that the registration agency denied it.
|
||||
*/
|
||||
public static final int REGISTER_FIRST = 6;
|
||||
public static final int RESERVE_FIRST = 6;
|
||||
/**
|
||||
* Error while authenticating against the registration agency.
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ public class DOIIdentifierException extends IdentifierException {
|
||||
return "FOREIGN_DOI";
|
||||
case BAD_ANSWER:
|
||||
return "BAD_ANSWER";
|
||||
case REGISTER_FIRST:
|
||||
case RESERVE_FIRST:
|
||||
return "REGISTER_FIRST";
|
||||
case AUTHENTICATION_ERROR:
|
||||
return "AUTHENTICATION_ERROR";
|
||||
|
@@ -600,7 +600,7 @@ implements DOIConnector
|
||||
+ "of DOIs. The DOI we wanted to register had not been "
|
||||
+ "reserved in advance. Please contact the administrator "
|
||||
+ "or take a look in DSpace log file.",
|
||||
DOIIdentifierException.REGISTER_FIRST);
|
||||
DOIIdentifierException.RESERVE_FIRST);
|
||||
}
|
||||
// Catch all other http status code in case we forgot one.
|
||||
default :
|
||||
|
@@ -125,7 +125,7 @@ implements org.dspace.identifier.doi.DOIConnector
|
||||
if (!reserved.containsKey(doi))
|
||||
{
|
||||
throw new DOIIdentifierException("Trying to register an unreserverd "
|
||||
+ "DOI.", DOIIdentifierException.REGISTER_FIRST);
|
||||
+ "DOI.", DOIIdentifierException.RESERVE_FIRST);
|
||||
}
|
||||
|
||||
if (reserved.get(doi).intValue() != dso.getID())
|
||||
|
Reference in New Issue
Block a user