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

@ -1026,27 +1026,17 @@ public class GWTWorkspaceBuilder {
case FOLDER_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);
// FolderItem folderItem = (FolderItem) item;
fileGridModel = (FileGridModel) setFolderItemTypeForSearch(fileGridModel, folderItem);
break;
case SHARED_FOLDER:
//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.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_DOCUMENTS);
fileGridModel.setShareable(true);
// fileGridModel.setDescription(item.getDescription()); // GET DESCRIPTION IN SEARCH //TODO
// WorkspaceSharedFolder sharedFolder = (WorkspaceSharedFolder) item;
// fileGridModel.setListShareUser(buildGxtInfoContactFromPortalLogin(sharedFolder.getUsers()));
break;
@ -1063,7 +1053,7 @@ public class GWTWorkspaceBuilder {
//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();
if(portalLogin!=null){
String fullName = portalLogin;
@ -1077,7 +1067,7 @@ public class GWTWorkspaceBuilder {
else{
if(userLogged!=null)
fileGridModel.setOwnerFullName(userLogged.getName());
}*/
}
return fileGridModel;