From 9b3e331f3d313e2abdd14a4825d0399881af0d2d Mon Sep 17 00:00:00 2001 From: anttil <anttil> Date: Tue, 7 Feb 2017 09:56:53 +0000 Subject: [PATCH] SSDM-4722: Data Model: Extend definition of external data management systems SVN: 37699 --- .../api/v1/impl/ExternalDataManagementSystem.java | 11 +++++++---- .../impl/ExternalDataManagementSystemImmutable.java | 13 +++++++++++++ .../impl/ExternalDataManagementSystemWrapper.java | 5 +++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystem.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystem.java index 2d37b0951bc..37e08072996 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystem.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystem.java @@ -17,6 +17,7 @@ package ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl; import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.IExternalDataManagementSystem; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystemType; /** * @author Pawel Glyzewski @@ -36,14 +37,16 @@ public class ExternalDataManagementSystem extends ExternalDataManagementSystemIm } @Override - public void setUrlTemplate(String urlTemplate) + public void setAddress(String address) { - getExternalDataManagementSystem().setUrlTemplate(urlTemplate); + getExternalDataManagementSystem().setAddress(address); + getExternalDataManagementSystem().setUrlTemplate(address); } @Override - public void setOpenBIS(boolean openBIS) + public void setAddressType(ExternalDataManagementSystemType addressType) { - getExternalDataManagementSystem().setOpenBIS(openBIS); + getExternalDataManagementSystem().setAddressType(addressType); + getExternalDataManagementSystem().setOpenBIS(ExternalDataManagementSystemType.OPENBIS.equals(addressType)); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemImmutable.java index 9bed8382846..7c35725bbd8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemImmutable.java @@ -18,6 +18,7 @@ package ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl; import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.IExternalDataManagementSystemImmutable; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystem; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystemType; /** * @author Pawel Glyzewski @@ -66,4 +67,16 @@ public class ExternalDataManagementSystemImmutable implements { return getExternalDataManagementSystem().isOpenBIS(); } + + @Override + public String getAddress() + { + return getExternalDataManagementSystem().getAddress(); + } + + @Override + public ExternalDataManagementSystemType getAddressType() + { + return getExternalDataManagementSystem().getAddressType(); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemWrapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemWrapper.java index 27f1d98f75b..9fa8a18127f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemWrapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExternalDataManagementSystemWrapper.java @@ -17,6 +17,7 @@ package ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl; import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.IExternalDataManagementSystem; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalDataManagementSystemType; /** * Wrapper of {@link ExternalDataManagementSystemImmutable} as {@link IExternalDataManagementSystem} where setters do nothing. @@ -37,12 +38,12 @@ public class ExternalDataManagementSystemWrapper extends ExternalDataManagementS } @Override - public void setUrlTemplate(String urlTemplate) + public void setAddress(String address) { } @Override - public void setOpenBIS(boolean openBIS) + public void setAddressType(ExternalDataManagementSystemType addressType) { } } -- GitLab