mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Support additional prefixes
This commit is contained in:
@@ -67,14 +67,14 @@ public class HandleIdentifierProvider extends IdentifierProvider {
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// return true if base prefix matches in case of multi-instance deployment with derived prefixes demarcated by a dot "."
|
|
||||||
if(prefix.contains(".")) {
|
//Check additional prefixes supported in the config file
|
||||||
String[] splitPrefix = prefix.split("\\.");
|
String[] additionalPrefixes = DSpaceServicesFactory.getInstance().getConfigurationService().getArrayProperty("handle.additional.prefixes");
|
||||||
if(splitPrefix.length > 1 && identifier.startsWith(splitPrefix[0])) {
|
for(String additionalPrefix: additionalPrefixes) {
|
||||||
|
if (identifier.startsWith(additionalPrefix)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// otherwise, assume invalid handle
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user