Bugfix: Renamed static final int in DOIIdentifierException.

Renamed DOIIdentifierException.REGISTER_FIRST to
DOIIdentifierException.RESERVE_FIRST.
This commit is contained in:
Pascal-Nicolas Becker
2013-11-25 14:15:21 +01:00
parent bd32eb4726
commit 1dbe77b654
4 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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";

View File

@@ -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 :

View File

@@ -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())