in progress on #21388
This commit is contained in:
parent
fd6d1570e8
commit
cc17be1761
|
@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
#### Enhancements
|
||||
|
||||
[#21388] Integrated with new workspace to new workflow to interact with ws-thredds 1.x
|
||||
[#21388] Integrated with new workflow to interact with ws-thredds 1.x
|
||||
|
||||
## [v6.32.0] - 2021-04-12
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.gcube.common.storagehubwrapper.shared.tohl.items.URLItem;
|
|||
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.ThSyncFolderDescriptor;
|
||||
import org.gcube.portal.wssynclibrary.thredds.WorkspaceThreddsSynchronize;
|
||||
import org.gcube.portlets.user.urlshortener.UrlShortener;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
|
@ -77,6 +78,7 @@ import org.gcube.portlets.widgets.workspacesharingwidget.server.notifications.No
|
|||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
import org.gcube.usecases.ws.thredds.faults.WorkspaceNotSynchedException;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
|
@ -228,24 +230,35 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
/**
|
||||
* Checks if is item under sync.
|
||||
*
|
||||
* @param itemId
|
||||
* the item id
|
||||
* @param itemId the item id
|
||||
* @return true, if is item under sync
|
||||
* @throws Exception
|
||||
* the exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public Boolean isItemUnderSync(String itemId) throws Exception {
|
||||
|
||||
ThSyncFolderDescriptor theConfig = null;
|
||||
try {
|
||||
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
||||
|
||||
try {
|
||||
Sync_Status status = WorkspaceThreddsSynchronize.getInstance().getSynchedStatusFromItemProperty(itemId,
|
||||
user.getUsername());
|
||||
theConfig = WorkspaceThreddsSynchronize.getInstance().getConfiguration(itemId);
|
||||
} catch (WorkspaceNotSynchedException e) {
|
||||
workspaceLogger
|
||||
.debug("WorkspaceNotSynchedException catched, the item with id: " + itemId + " is not synched");
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
workspaceLogger.debug("Error on getting configuration for the item id: " + itemId
|
||||
+ ", returning null (means not synched)");
|
||||
return false;
|
||||
}
|
||||
// HERE THE ITEM IS SYNCHED SO CHECK IF IT IS LOCKED
|
||||
|
||||
if (theConfig == null) {
|
||||
workspaceLogger.debug(
|
||||
"No ws-thredds config found the item with id:" + itemId + ", returning item is not synched");
|
||||
return false;
|
||||
}
|
||||
|
||||
// HERE THE ITEM IS SYNCHED SO CHECKING IF IT IS LOCKED
|
||||
checkItemLocked(itemId);
|
||||
return false;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue