Skip to content
Snippets Groups Projects
Commit cb4f708a authored by yvesn's avatar yvesn
Browse files

SSDM-6228: added archivingRequested to physical data DTOs

parent 2307fc56
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,9 @@ import java.util.Map.Entry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.update.FieldUpdateValue;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.update.DataSetUpdate;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.update.PhysicalDataUpdate;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.batch.MapBatch;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE;
......@@ -46,7 +48,13 @@ public class UpdateDataSetPhysicalDataExecutor implements IUpdateDataSetPhysical
DataPE dataPE = entry.getValue();
if (dataPE instanceof ExternalDataPE) {
ExternalDataPE externalDataPE = (ExternalDataPE) dataPE;
externalDataPE.setArchivingRequested(dataSetUpdate.getPhysicalData().getValue().getArchivingRequested().getValue());
FieldUpdateValue<PhysicalDataUpdate> physicalData = dataSetUpdate.getPhysicalData();
if (physicalData != null && physicalData.getValue() != null) {
FieldUpdateValue<Boolean> archivingRequested = physicalData.getValue().getArchivingRequested();
if (archivingRequested != null && archivingRequested.getValue() != null) {
externalDataPE.setArchivingRequested(dataSetUpdate.getPhysicalData().getValue().getArchivingRequested().getValue());
}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment