fix(#8852): Statistics event processor now uses oaiPrefix instead of getHost

This commit is contained in:
JohnnyMendesC
2025-08-14 14:05:45 -03:00
parent 90a4d5b0a9
commit c8fe80c22b
3 changed files with 4 additions and 1 deletions

View File

@@ -137,9 +137,10 @@ public abstract class ExportEventProcessor {
.append(URLEncoder.encode(clientUA, UTF_8));
String hostName = Utils.getHostName(configurationService.getProperty("dspace.ui.url"));
String oaiPrefix = configurationService.getProperty("oai.identifier.prefix");
data.append("&").append(URLEncoder.encode("rft.artnum", UTF_8)).append("=").
append(URLEncoder.encode("oai:" + hostName + ":" + item
append(URLEncoder.encode("oai:" + oaiPrefix + ":" + item
.getHandle(), UTF_8));
data.append("&").append(URLEncoder.encode("rfr_dat", UTF_8)).append("=")
.append(URLEncoder.encode(referer, UTF_8));

View File

@@ -116,6 +116,7 @@ public class ITIrusExportUsageEventListener extends AbstractIntegrationTestWithD
configurationService.setProperty("irus.statistics.tracker.enabled", true);
configurationService.setProperty("irus.statistics.tracker.type-field", "dc.type");
configurationService.setProperty("irus.statistics.tracker.type-value", "Excluded type");
configurationService.setProperty("oai.identifier.prefix", "localhost");
context.turnOffAuthorisationSystem();

View File

@@ -62,6 +62,7 @@ public class ExportEventProcessorIT extends AbstractIntegrationTestWithDatabase
configurationService.setProperty("irus.statistics.tracker.enabled", true);
configurationService.setProperty("irus.statistics.tracker.type-field", "dc.type");
configurationService.setProperty("irus.statistics.tracker.type-value", "Excluded type");
configurationService.setProperty("oai.identifier.prefix", "localhost");
context.turnOffAuthorisationSystem();
publication = EntityTypeBuilder.createEntityTypeBuilder(context, "Publication").build();