|
|
|
@ -197,6 +197,11 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
|
|
|
|
|
config = BeanConverter.toThSynchFolderConfiguration(clientConfig, folderId,
|
|
|
|
|
clientConfig.getSelectedScope().getScopeName());
|
|
|
|
|
logger.debug("Creating server config " + config);
|
|
|
|
|
}else {
|
|
|
|
|
logger.info("The config sent from client is null, Loading it from ws-thredds");
|
|
|
|
|
ThSyncFolderDescriptor descr = getSyncService().getConfiguration(folderId, false, this.getThreadLocalRequest(), user);
|
|
|
|
|
logger.info("From ws-thredds loaded the config: "+config);
|
|
|
|
|
config = descr.getConfiguration();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ThSyncStatus status = getSyncService().doSyncFolder(folderId, config, this.getThreadLocalRequest(), user);
|
|
|
|
@ -205,7 +210,7 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
|
|
|
|
|
return status;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("Do sync Folder error: ", e);
|
|
|
|
|
throw new Exception("Sorry, an error occurred during synchonization phase, try again later");
|
|
|
|
|
throw new Exception("Sorry, an error occurred during synchonization phase. The server encountered the error: "+e.getMessage(), e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|