|
|
|
@ -126,14 +126,14 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
|
|
|
|
|
logger.debug("called isItemSynched for folderId: " + folderId);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
ThSyncFolderDescriptor theConfig = getSyncService().isItemSynched(folderId);
|
|
|
|
|
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
|
|
|
|
String wsScope = PortalContext.getConfiguration().getCurrentScope(this.getThreadLocalRequest());
|
|
|
|
|
String wsUserToken = PortalContext.getConfiguration().getCurrentUserToken(wsScope, user.getUsername());
|
|
|
|
|
|
|
|
|
|
ThSyncFolderDescriptor theConfig = getSyncService().isItemSynched(folderId,wsScope,wsUserToken);
|
|
|
|
|
|
|
|
|
|
if (theConfig != null) {
|
|
|
|
|
logger.info("Folder id: " + folderId + " is synched");
|
|
|
|
|
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
|
|
|
|
String wsScope = PortalContext.getConfiguration().getCurrentScope(this.getThreadLocalRequest());
|
|
|
|
|
String wsUserToken = PortalContext.getConfiguration().getCurrentUserToken(wsScope, user.getUsername());
|
|
|
|
|
Sync_Status theStatus = getSyncService().getSyncStatusInfo(folderId,wsScope,wsUserToken);
|
|
|
|
|
WsThreddsSynchFolderDescriptor toWsThreddFolder = BeanConverter.toWsThreddsFolderConfig(theConfig,
|
|
|
|
|
theStatus);
|
|
|
|
@ -206,7 +206,9 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
|
|
|
|
ThSyncFolderDescriptor foldeDesr = getSyncService().isItemSynched(folderId);
|
|
|
|
|
String wsScope = PortalContext.getConfiguration().getCurrentScope(this.getThreadLocalRequest());
|
|
|
|
|
String wsUserToken = PortalContext.getConfiguration().getCurrentUserToken(wsScope, user.getUsername());
|
|
|
|
|
ThSyncFolderDescriptor foldeDesr = getSyncService().isItemSynched(folderId,wsScope,wsUserToken);
|
|
|
|
|
return getSyncService().doUnSync(folderId, true, foldeDesr.getConfiguration(), this.getThreadLocalRequest(),
|
|
|
|
|
user);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|