removed geSyncStatus

task_21379
Francesco Mangiacrapa 3 years ago
parent ac7fb2101b
commit 2cdc935d37

@ -214,9 +214,7 @@ public abstract class ShowThreddsFolderInfoView extends Composite {
return;
}
if(syncFolderDesc.getSyncStatus()!=null) {
this.field_folder_status.setValue(syncFolderDesc.getSyncStatus().toString());
}
if(syncFolderDesc.getSelectedScope()!=null) {
String toValue = FormatUtil.toScopeValue(syncFolderDesc.getSelectedScope());
@ -231,6 +229,9 @@ public abstract class ShowThreddsFolderInfoView extends Composite {
this.field_folder_path.setValue(sfd.getFolderPath());
this.field_folder_path.setTitle(sfd.getFolderPath());
this.field_folder_locked.setValue(sfd.isLocked()+"");
if(sfd.getElementInfo()!=null)
this.field_folder_status.setValue(sfd.getElementInfo().getSyncStatus().toString());
ThSynchFolderConfiguration config = sfd.getConfiguration();
@ -239,6 +240,7 @@ public abstract class ShowThreddsFolderInfoView extends Composite {
this.field_catalogue_name.setTitle(config.getToCreateCatalogName());
this.field_remote_path.setValue(config.getRemotePath());
this.field_remote_path.setTitle(config.getRemotePath());
}

@ -1,6 +1,5 @@
package org.gcube.portlets.widgets.wsthreddssync.server;
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncFolderDescriptor;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSynchFolderConfiguration;
import org.gcube.portlets.widgets.wsthreddssync.shared.GcubeScope;
@ -31,15 +30,13 @@ public class BeanConverter {
* @param theStatus the the status
* @return the ws thredds synch folder descriptor
*/
public static WsThreddsSynchFolderDescriptor toWsThreddsFolderConfig(ThSyncFolderDescriptor t,
Sync_Status theStatus) {
public static WsThreddsSynchFolderDescriptor toWsThreddsFolderConfig(ThSyncFolderDescriptor t) {
if (t == null || t.getConfiguration()==null)
return null;
WsThreddsSynchFolderDescriptor ws = new WsThreddsSynchFolderDescriptor();
ws.setServerFolderDescriptor(t);
ws.setSyncStatus(theStatus);
// FROM TARGET TOKEN TO SCOPE
// t.getConfiguration().getTargetToken()

@ -14,7 +14,6 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.oidc.rest.JWTToken;
import org.gcube.portal.oidc.lr62.OIDCUmaUtil;
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
import org.gcube.portal.wssynclibrary.shared.thredds.ThCatalogueBean;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncFolderDescriptor;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncStatus;
@ -385,19 +384,19 @@ public class SyncronizeWithThredds {
workspaceThreddsSynchronize.registerCallbackForId(folderId);
}
/**
* Gets the sync status info.
*
* @param itemId the item id
* @param scope the scope
* @param userToken the user token
* @return the sync status info
* @throws Exception the exception
*/
public Sync_Status getSyncStatusInfo(String itemId, String scope, String userToken) throws Exception {
setContextParameters(scope, userToken);
return workspaceThreddsSynchronize.getInfo(itemId);
}
// /**
// * Gets the sync status info.
// *
// * @param itemId the item id
// * @param scope the scope
// * @param userToken the user token
// * @return the sync status info
// * @throws Exception the exception
// */
// public Sync_Status getSyncStatusInfo(String itemId, String scope, String userToken) throws Exception {
// setContextParameters(scope, userToken);
// return workspaceThreddsSynchronize.getInfoAfterCheck(itemId);
//
// }
}

@ -10,7 +10,6 @@ import java.util.Set;
import org.gcube.common.portal.PortalContext;
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
import org.gcube.portal.wssynclibrary.shared.WorkspaceFolderLocked;
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
import org.gcube.portal.wssynclibrary.shared.thredds.ThCatalogueBean;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncFolderDescriptor;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncStatus;
@ -134,9 +133,7 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
if (theConfig != null) {
logger.info("Folder id: " + folderId + " is synched");
Sync_Status theStatus = getSyncService().getSyncStatusInfo(folderId,wsScope,wsUserToken);
WsThreddsSynchFolderDescriptor toWsThreddFolder = BeanConverter.toWsThreddsFolderConfig(theConfig,
theStatus);
WsThreddsSynchFolderDescriptor toWsThreddFolder = BeanConverter.toWsThreddsFolderConfig(theConfig);
logger.debug("isItemSynched for id: " + folderId + " returning: " + toWsThreddFolder);
return toWsThreddFolder;
}

@ -2,17 +2,14 @@ package org.gcube.portlets.widgets.wsthreddssync.shared;
import java.io.Serializable;
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
import org.gcube.portal.wssynclibrary.shared.thredds.ThSyncFolderDescriptor;
// TODO: Auto-generated Javadoc
/**
* The Class WsThreddsSynchFolderDescriptor.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* May 10, 2021
* May 13, 2021
*/
public class WsThreddsSynchFolderDescriptor implements Serializable {
@ -25,33 +22,24 @@ public class WsThreddsSynchFolderDescriptor implements Serializable {
private ThSyncFolderDescriptor serverFolderDescriptor;
private Sync_Status syncStatus;
/**
* Instantiates a new ws thredds synch folder configuration.
*/
public WsThreddsSynchFolderDescriptor() {
// TODO Auto-generated constructor stub
}
/**
* Instantiates a new ws thredds synch folder descriptor.
*
* @param selectedScope the selected scope
* @param selectedScope the selected scope
* @param serverFolderDescriptor the server folder descriptor
* @param syncStatus the sync status
*/
public WsThreddsSynchFolderDescriptor(GcubeScope selectedScope, ThSyncFolderDescriptor serverFolderDescriptor,
Sync_Status syncStatus) {
public WsThreddsSynchFolderDescriptor(GcubeScope selectedScope, ThSyncFolderDescriptor serverFolderDescriptor) {
super();
this.selectedScope = selectedScope;
this.serverFolderDescriptor = serverFolderDescriptor;
this.syncStatus = syncStatus;
}
/**
* Gets the selected scope.
*
@ -62,26 +50,6 @@ public class WsThreddsSynchFolderDescriptor implements Serializable {
return selectedScope;
}
/**
* Sets the sync status.
*
* @param syncStatus
* the new sync status
*/
public void setSyncStatus(Sync_Status syncStatus) {
this.syncStatus = syncStatus;
}
/**
* Gets the sync status.
*
* @return the sync status
*/
public Sync_Status getSyncStatus() {
return syncStatus;
}
/**
* Sets the selected scope.
*
@ -103,33 +71,21 @@ public class WsThreddsSynchFolderDescriptor implements Serializable {
/**
* Sets the server folder descriptor.
*
* @param serverFolderDescriptor
* the new server folder descriptor
* @param serverFolderDescriptor the new server folder descriptor
*/
public void setServerFolderDescriptor(ThSyncFolderDescriptor serverFolderDescriptor) {
this.serverFolderDescriptor = serverFolderDescriptor;
}
/**
* To string.
*
* @return the string
*/
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("WsThreddsSynchFolderDescriptor [selectedVRE=");
builder.append("WsThreddsSynchFolderDescriptor [selectedScope=");
builder.append(selectedScope);
builder.append(", serverFolderDescriptor=");
builder.append(serverFolderDescriptor);
builder.append(", syncStatus=");
builder.append(syncStatus);
builder.append("]");
return builder.toString();
}
}

Loading…
Cancel
Save