From 8d2c3503c247a0611418b09c4814b23ef6e8a1a7 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Wed, 14 May 2014 08:08:21 +0000 Subject: [PATCH] SSDM-121: Fixing JSON serialization bug in ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DataSet. SVN: 31501 --- .../openbis/generic/shared/api/v1/dto/DataSet.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/DataSet.java b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/DataSet.java index 6989386d015..fbb4bb18f91 100644 --- a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/DataSet.java +++ b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/DataSet.java @@ -698,6 +698,18 @@ public final class DataSet implements Serializable, IIdHolder this.registrationDetails = registrationDetails; } + private void setContainerOrNull(DataSet containerOrNull) + { + // Does nothing. It is needed by Jackson. + // With the corresponding getContainerOrNull() method Jackson creates a JSON object + // with attribute containerOrNull and containerDataSets. + // Currently we do not need to care about the creation of an instance of this Java class from a + // JSON object which has both attributes set because the JSON APIs have currently no + // method with an argument containing a DataSet object. The only exception is + // IGeneralInformationService.filterDataSetsVisibleToUser() but we can assume that it containes only + // data sets received from the server and not created on the client side. + } + private void setContainerDataSet(boolean containerDataSet) { this.containerDataSet = containerDataSet; -- GitLab