diff --git a/src/main/java/eu/dissco/core/handlemanager/properties/ApplicationProperties.java b/src/main/java/eu/dissco/core/handlemanager/properties/ApplicationProperties.java index 1b0f1a48..f35dfd1a 100644 --- a/src/main/java/eu/dissco/core/handlemanager/properties/ApplicationProperties.java +++ b/src/main/java/eu/dissco/core/handlemanager/properties/ApplicationProperties.java @@ -20,7 +20,10 @@ public class ApplicationProperties { private String uiUrl; @NotBlank - private String orchestrationUrl; + private String orchestrationUi; + + @NotBlank + private String orchestrationApi; @NotNull private Integer maxHandles; diff --git a/src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java b/src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java index 2b33216a..341fb657 100644 --- a/src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java +++ b/src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java @@ -878,15 +878,15 @@ private List getXmlElements(String handle, FdoType fdoType, String k } case DATA_MAPPING -> { locations.add(new XmlElement(i.getAndIncrement(), "1", - applicationProperties.getOrchestrationUrl() + "/data-mapping/" + handle, "HTML")); + applicationProperties.getOrchestrationUi() + "/data-mapping/" + handle, "HTML")); locations.add(new XmlElement(i.getAndIncrement(), "0", - applicationProperties.getOrchestrationUrl() + "/data-mapping/v1/" + handle, "JSON")); + applicationProperties.getOrchestrationApi() + "/data-mapping/v1/" + handle, "JSON")); } case SOURCE_SYSTEM -> { locations.add(new XmlElement(i.getAndIncrement(), "1", - applicationProperties.getOrchestrationUrl() + "/source-system/" + handle, "HTML")); + applicationProperties.getOrchestrationUi() + "/source-system/" + handle, "HTML")); locations.add(new XmlElement(i.getAndIncrement(), "0", - applicationProperties.getOrchestrationUrl() + "/source-system/v1/" + handle, + applicationProperties.getOrchestrationApi() + "/source-system/v1/" + handle, "JSON")); } case DIGITAL_MEDIA -> { @@ -904,9 +904,9 @@ private List getXmlElements(String handle, FdoType fdoType, String k applicationProperties.getApiUrl() + "/annotations/v1/" + handle, "JSON")); case MAS -> { locations.add(new XmlElement(i.getAndIncrement(), "1", - applicationProperties.getOrchestrationUrl() + "/mas/" + handle, "HTML")); + applicationProperties.getOrchestrationUi() + "/mas/" + handle, "HTML")); locations.add(new XmlElement(i.getAndIncrement(), "0", - applicationProperties.getOrchestrationUrl() + "/mas/v1/" + handle, "JSON")); + applicationProperties.getOrchestrationApi() + "/mas/v1/" + handle, "JSON")); } case ORGANISATION -> locations.add(new XmlElement(i.getAndIncrement(), "1", keyAttribute, "ROR")); diff --git a/src/test/java/eu/dissco/core/handlemanager/service/FdoRecordServiceTest.java b/src/test/java/eu/dissco/core/handlemanager/service/FdoRecordServiceTest.java index c00cadc7..8df0d286 100644 --- a/src/test/java/eu/dissco/core/handlemanager/service/FdoRecordServiceTest.java +++ b/src/test/java/eu/dissco/core/handlemanager/service/FdoRecordServiceTest.java @@ -114,7 +114,8 @@ void init() throws PidResolutionException { given(pidResolver.getObjectName(any(), anyBoolean())).willReturn(SPECIMEN_HOST_NAME_TESTVAL); given(applicationProperties.getPrefix()).willReturn(PREFIX); given(applicationProperties.getApiUrl()).willReturn(API_URL); - given(applicationProperties.getOrchestrationUrl()).willReturn(ORCHESTRATION_URL); + given(applicationProperties.getOrchestrationApi()).willReturn(ORCHESTRATION_URL); + given(applicationProperties.getOrchestrationUi()).willReturn(ORCHESTRATION_URL); given(applicationProperties.getUiUrl()).willReturn(UI_URL); given(profileProperties.getIssuedForAgent()).willReturn(ISSUED_FOR_AGENT_TESTVAL); given(profileProperties.getIssuedForAgentName()).willReturn(ISSUED_FOR_AGENT_NAME_TESTVAL);