From 6506500f91943a3843b76627b1b910ab5c84871a Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Tue, 18 May 2021 12:47:19 +0200 Subject: [PATCH] compleated the bean ThSyncElementInfo --- .../shared/thredds/ThSyncElementInfo.java | 65 +++++++++++++++++++ .../thredds/ThreddsConverter.java | 2 + 2 files changed, 67 insertions(+) diff --git a/src/main/java/org/gcube/portal/wssynclibrary/shared/thredds/ThSyncElementInfo.java b/src/main/java/org/gcube/portal/wssynclibrary/shared/thredds/ThSyncElementInfo.java index 9a23297..2f08f09 100644 --- a/src/main/java/org/gcube/portal/wssynclibrary/shared/thredds/ThSyncElementInfo.java +++ b/src/main/java/org/gcube/portal/wssynclibrary/shared/thredds/ThSyncElementInfo.java @@ -2,6 +2,8 @@ package org.gcube.portal.wssynclibrary.shared.thredds; import java.io.Serializable; +import org.gcube.usecases.ws.thredds.model.StepReport; + /** * The Class ThSyncElementInfo. * @@ -18,23 +20,86 @@ public class ThSyncElementInfo implements Serializable { private Sync_Status syncStatus; + private StepReport.Status lastSynchronizationStatus; + + private String lastupdateTime; + + /** + * Instantiates a new th sync element info. + */ public ThSyncElementInfo() { } + /** + * Instantiates a new th sync element info. + * + * @param syncStatus the sync status + */ public ThSyncElementInfo(Sync_Status syncStatus) { super(); this.syncStatus = syncStatus; } + /** + * Gets the sync status. + * + * @return the sync status + */ public Sync_Status getSyncStatus() { return syncStatus; } + /** + * Sets the sync status. + * + * @param syncStatus the new sync status + */ public void setSyncStatus(Sync_Status syncStatus) { this.syncStatus = syncStatus; } + /** + * Gets the last synchronization status. + * + * @return the last synchronization status + */ + public StepReport.Status getLastSynchronizationStatus() { + return lastSynchronizationStatus; + } + + /** + * Sets the last synchronization status. + * + * @param lastSynchronizationStatus the new last synchronization status + */ + public void setLastSynchronizationStatus(StepReport.Status lastSynchronizationStatus) { + this.lastSynchronizationStatus = lastSynchronizationStatus; + } + + /** + * Gets the lastupdate time. + * + * @return the lastupdate time + */ + public String getLastupdateTime() { + return lastupdateTime; + } + + /** + * Sets the lastupdate time. + * + * @param lastupdateTime the new lastupdate time + */ + public void setLastupdateTime(String lastupdateTime) { + this.lastupdateTime = lastupdateTime; + } + + /** + * To string. + * + * @return the string + */ @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/main/java/org/gcube/portal/wssynclibrary/thredds/ThreddsConverter.java b/src/main/java/org/gcube/portal/wssynclibrary/thredds/ThreddsConverter.java index ced67e8..9de5ac6 100644 --- a/src/main/java/org/gcube/portal/wssynclibrary/thredds/ThreddsConverter.java +++ b/src/main/java/org/gcube/portal/wssynclibrary/thredds/ThreddsConverter.java @@ -208,6 +208,8 @@ public class ThreddsConverter { ThSyncElementInfo toReturn = new ThSyncElementInfo(); Sync_Status theSyncStatus = toSyncStatus.apply(sei.getStatus()); toReturn.setSyncStatus(theSyncStatus); + toReturn.setLastupdateTime(sei.getLastupdateTime()); + toReturn.setLastSynchronizationStatus(sei.getLastSynchronizationStatus()); return toReturn; } };