Added Identifier when showing Get Info

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@178992 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-04-10 14:46:46 +00:00
parent 63532be8e1
commit 12a5803750
2 changed files with 20 additions and 9 deletions

View File

@ -45,6 +45,7 @@ public class DialogGetInfo extends Dialog {
private int widthDialog = 450;
private int heightTextArea = 50;
private TextField<String> txtName = new TextField<String>();
private TextField<String> txtId = new TextField<String>();
private TextField<String> txtAreaDescription = new TextArea();
private TextField<String> txtType = new TextField<String>();
private TextField<String> txtCategory = new TextField<String>();
@ -87,6 +88,13 @@ public class DialogGetInfo extends Dialog {
txtName.setReadOnly(true);
textFieldSetValue(txtName, fileModel.getName());
add(txtName);
txtId = new TextField<String>();
txtId.setFieldLabel("Identifier");
txtId.setReadOnly(true);
textFieldSetValue(txtId, fileModel.getIdentifier());
add(txtId);
txtLocation = new TextField<String>();
txtLocation.setFieldLabel("Location");

View File

@ -2629,7 +2629,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
*/
@Override
public List<FileModel> getFolderChildren(FolderModel folder) throws Exception, SessionExpiredException {
org.gcube.common.storagehubwrapper.server.tohl.Workspace shWorkspace;
if (isSessionExpired())
@ -2640,11 +2640,8 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
if (folder == null)
throw new Exception("Folder is null");
workspaceLogger.trace("Getting Workspace from SHUB");
workspaceLogger.info("Get FolderChildren called for folder: "+folder.getIdentifier());
shWorkspace = getWorkspaceFromStorageHub();
// org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem
// wsItem = workspace.getItem(folder.getIdentifier()); //removed for
// optimization
// REMEMBER wsItem.isRoot() is always false;
@ -2653,6 +2650,8 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
.getFilteredChildren(folder.getIdentifier(),
org.gcube.common.storagehub.model.items.FolderItem.class);
workspaceLogger.info("The children are: "+children.size());
for (org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem workspaceItem : children) {
workspaceLogger
.trace("The ITEM: " + workspaceItem.getName() + ", is shared: " + workspaceItem.isShared()
@ -2676,6 +2675,8 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
}
boolean isRoot = WsUtil.isRootFolder(folder, converter);
workspaceLogger.info("Is the workspace folder "+folder.getName() + "with id: "+folder.getIdentifier()+" the root? "+isRoot);
// ADDING VRE FOLDER?
if (isRoot) {
@ -2744,12 +2745,13 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
* @throws Exception
* the exception
* @throws SessionExpiredException
* the session expired exception
* the session expired exceptionworkspaceLogger.info("The children are: "+children.size());
*/
@Override
public List<FileGridModel> getFolderChildrenForFileGrid(FileModel folder)
throws Exception, SessionExpiredException {
if (isSessionExpired())
throw new SessionExpiredException();
@ -2757,12 +2759,13 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
if (folder == null)
throw new Exception("Folder is null");
workspaceLogger.trace("Get Grid children for folder: " + folder.getIdentifier());
workspaceLogger.info("Get FolderChildrenForFileGrid called for folder: "+folder.getIdentifier());
org.gcube.common.storagehubwrapper.server.tohl.Workspace shWorkspace = getWorkspaceFromStorageHub();
List<? extends org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem> children = shWorkspace
.getChildren(folder.getIdentifier());
workspaceLogger.info("The children are: "+children.size());
StorageHubToWorkpaceConverter converter = getStorageHubToWorkpaceConverter();
List<FileGridModel> listFileGridModels = new ArrayList<FileGridModel>(children.size());
// boolean isParentShared = folder.isShared();