Skip to content

Commit

Permalink
Support additional prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Aug 15, 2016
1 parent 9065591 commit f5c4fbc
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ public boolean supports(String identifier)
{
return true;
}
// return true if base prefix matches in case of multi-instance deployment with derived prefixes demarcated by a dot "."
if(prefix.contains(".")) {
String[] splitPrefix = prefix.split("\\.");
if(splitPrefix.length > 1 && identifier.startsWith(splitPrefix[0])) {

//Check additional prefixes supported in the config file
String[] additionalPrefixes = DSpaceServicesFactory.getInstance().getConfigurationService().getArrayProperty("handle.additional.prefixes");
for(String additionalPrefix: additionalPrefixes) {
if (identifier.startsWith(additionalPrefix)) {
return true;
}
}
// otherwise, assume invalid handle
return false;
}

Expand Down

0 comments on commit f5c4fbc

Please sign in to comment.