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