added owner - fixed support ticket #757

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@92281 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-02-25 15:50:32 +00:00
parent 8fe2a21347
commit 0858fbd167
1 changed files with 4 additions and 14 deletions

View File

@ -1025,29 +1025,19 @@ public class GWTWorkspaceBuilder {
break; break;
case FOLDER_ITEM: case FOLDER_ITEM:
SearchFolderItem folderItem = (SearchFolderItem) item; SearchFolderItem folderItem = (SearchFolderItem) item;
// fileGridModel = new FileGridModel(item.getId(), item.getName(), toDate(item.getCreationDate()), parentFileModel, folderItem.getSize(), false, false);
fileGridModel = new FileGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, folderItem.getSize(), false, false); fileGridModel = new FileGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, folderItem.getSize(), false, false);
// FolderItem folderItem = (FolderItem) item;
fileGridModel = (FileGridModel) setFolderItemTypeForSearch(fileGridModel, folderItem); fileGridModel = (FileGridModel) setFolderItemTypeForSearch(fileGridModel, folderItem);
break; break;
case SHARED_FOLDER: case SHARED_FOLDER:
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder //ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
// WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
// String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
// fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getCreationDate()), parentFileModel, -1, true, false);
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder()); fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder());
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString()); fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_DOCUMENTS); fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_DOCUMENTS);
fileGridModel.setShareable(true); fileGridModel.setShareable(true);
// fileGridModel.setDescription(item.getDescription()); // GET DESCRIPTION IN SEARCH //TODO
// WorkspaceSharedFolder sharedFolder = (WorkspaceSharedFolder) item;
// fileGridModel.setListShareUser(buildGxtInfoContactFromPortalLogin(sharedFolder.getUsers()));
break; break;
default: default:
@ -1063,7 +1053,7 @@ public class GWTWorkspaceBuilder {
//OWNER //OWNER
/*if(fileGridModel.isShared()){ //IS READ FROM HL ONLY IF THE ITEM IS SHARED if(item.isShared()){ //IS READ FROM HL ONLY IF THE ITEM IS SHARED
String portalLogin = item.getOwner(); String portalLogin = item.getOwner();
if(portalLogin!=null){ if(portalLogin!=null){
String fullName = portalLogin; String fullName = portalLogin;
@ -1077,7 +1067,7 @@ public class GWTWorkspaceBuilder {
else{ else{
if(userLogged!=null) if(userLogged!=null)
fileGridModel.setOwnerFullName(userLogged.getName()); fileGridModel.setOwnerFullName(userLogged.getName());
}*/ }
return fileGridModel; return fileGridModel;