mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00
77582: Rename formatHandle to parseHandle & add @Override
This commit is contained in:
@@ -386,7 +386,8 @@ public class HandleServiceImpl implements HandleService {
|
||||
return handleDAO.countRows(context);
|
||||
}
|
||||
|
||||
public String formatHandle(String identifier) {
|
||||
@Override
|
||||
public String parseHandle(String identifier) {
|
||||
if (identifier == null) {
|
||||
return null;
|
||||
}
|
||||
|
@@ -191,5 +191,5 @@ public interface HandleService {
|
||||
* @param identifier
|
||||
* @return
|
||||
*/
|
||||
String formatHandle(String identifier);
|
||||
String parseHandle(String identifier);
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public class HandleIdentifierProvider extends IdentifierProvider {
|
||||
|
||||
@Override
|
||||
public boolean supports(String identifier) {
|
||||
return handleService.formatHandle(identifier) != null;
|
||||
return handleService.parseHandle(identifier) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,7 +136,7 @@ public class HandleIdentifierProvider extends IdentifierProvider {
|
||||
public DSpaceObject resolve(Context context, String identifier, String... attributes) {
|
||||
// We can do nothing with this, return null
|
||||
try {
|
||||
identifier = handleService.formatHandle(identifier);
|
||||
identifier = handleService.parseHandle(identifier);
|
||||
return handleService.resolveToObject(context, identifier);
|
||||
} catch (IllegalStateException | SQLException e) {
|
||||
log.error(LogManager.getHeader(context, "Error while resolving handle to item", "handle: " + identifier),
|
||||
|
@@ -78,7 +78,7 @@ public class VersionedHandleIdentifierProvider extends IdentifierProvider {
|
||||
|
||||
@Override
|
||||
public boolean supports(String identifier) {
|
||||
return handleService.formatHandle(identifier) != null;
|
||||
return handleService.parseHandle(identifier) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -284,7 +284,7 @@ public class VersionedHandleIdentifierProvider extends IdentifierProvider {
|
||||
public DSpaceObject resolve(Context context, String identifier, String... attributes) {
|
||||
// We can do nothing with this, return null
|
||||
try {
|
||||
identifier = handleService.formatHandle(identifier);
|
||||
identifier = handleService.parseHandle(identifier);
|
||||
return handleService.resolveToObject(context, identifier);
|
||||
} catch (IllegalStateException | SQLException e) {
|
||||
log.error(LogManager.getHeader(context, "Error while resolving handle to item", "handle: " + identifier),
|
||||
|
@@ -72,7 +72,7 @@ public class VersionedHandleIdentifierProviderWithCanonicalHandles extends Ident
|
||||
|
||||
@Override
|
||||
public boolean supports(String identifier) {
|
||||
return handleService.formatHandle(identifier) != null;
|
||||
return handleService.parseHandle(identifier) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user