using internal getConfiguration

This commit is contained in:
Francesco Mangiacrapa 2021-05-19 17:29:38 +02:00
parent c8159a783e
commit a6609a5b4a
1 changed files with 6 additions and 3 deletions

View File

@ -1822,12 +1822,15 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspace = getWorkspaceFromStorageHub();
wsItem = workspace.getItem(itemId);
;
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
ThreddsWorkspaceSyncServiceImpl workspaceServiceServlet = new ThreddsWorkspaceSyncServiceImpl();
// IF THE ITEM IS A FOLDER, CHECKING IT
if (wsItem.isFolder()) {
// WorkspaceThreddsSynchronize.getInstance().checkItemSynched(wsItem.getId());
workspaceServiceServlet.getConfiguration(itemId, true);
workspaceServiceServlet.getConfiguration(itemId, true, this.getThreadLocalRequest(),user);
} else {
// IF THE ITEM IS A FILE, CHECKING ITS PARENT
String parentId = wsItem.getParentId();
@ -1835,7 +1838,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspaceLogger.warn("I'm not able to check the lock because the parent id is null");
} else {
//WorkspaceThreddsSynchronize.getInstance().checkItemSynched(parentId);
workspaceServiceServlet.getConfiguration(parentId, true);
workspaceServiceServlet.getConfiguration(itemId, true, this.getThreadLocalRequest(),user);
}
}
// in this case the folder is synched but not locked