removed ws.getItemByPath(wsitem.getPath())

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@124771 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-03-02 15:04:37 +00:00
parent bd9966c5ac
commit ec0c32cf6f
2 changed files with 12 additions and 12 deletions

View File

@ -2062,7 +2062,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
WorkspaceItem wsItem = workspace.getItem(folderId); WorkspaceItem wsItem = workspace.getItem(folderId);
if(wsItem.isShared() && wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER)){ if(wsItem.isShared() && wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER)){
WorkspaceSharedFolder ite = (WorkspaceSharedFolder) workspace.getItemByPath(wsItem.getPath()); WorkspaceSharedFolder ite = (WorkspaceSharedFolder) wsItem;
workspaceLogger.info("Retrieving administrators..."); workspaceLogger.info("Retrieving administrators...");
Map<ACLType, List<String>> aclOwner = ite.getACLOwner(); Map<ACLType, List<String>> aclOwner = ite.getACLOwner();
@ -2693,7 +2693,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
WorkspaceItem wsItem = workspace.getItem(folderId); WorkspaceItem wsItem = workspace.getItem(folderId);
if(wsItem.isShared() && wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER)){ if(wsItem.isShared() && wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER)){
WorkspaceSharedFolder ite = (WorkspaceSharedFolder) workspace.getItemByPath(wsItem.getPath()); WorkspaceSharedFolder ite = (WorkspaceSharedFolder) wsItem;
//PATCH TODO TEMPORARY SOLUTION //PATCH TODO TEMPORARY SOLUTION
if(ite.isVreFolder()){ if(ite.isVreFolder()){
List<String> groupName = new ArrayList<String>(); List<String> groupName = new ArrayList<String>();

View File

@ -31,9 +31,9 @@ public class ItemRetrieve {
// public static String DEFAULT_SCOPE = "/d4science.research-infrastructures.eu/gCubeApps"; //PRODUCTION // public static String DEFAULT_SCOPE = "/d4science.research-infrastructures.eu/gCubeApps"; //PRODUCTION
public static String DEFAULT_SCOPE = "/gcube/devsec"; //DEV public static String DEFAULT_SCOPE = "/gcube/devsec"; //DEV
public static String TEST_USER = "francesco.mangiacrapa"; public static String TEST_USER = "gianpaolo.coro";
// public static String ITEMID = "63832213-098d-42d1-8774-89b6349764c0"; //Activity T3.4 working drafts/T2-EC-IMAR-HO-14-015 iMarine Sustainability WP - Business Model tools.pdf // public static String ITEMID = "63832213-098d-42d1-8774-89b6349764c0"; //Activity T3.4 working drafts/T2-EC-IMAR-HO-14-015 iMarine Sustainability WP - Business Model tools.pdf
// public static String ITEMID = "79b2490b-43aa-40b0-98ec-e073cf7d4887"; public static String ITEMID = "a5aca54d-67cf-4838-9025-9ef5bb204ae9";
// d81d3a64-603f-4907-ae74-be8353211807 // d81d3a64-603f-4907-ae74-be8353211807
protected static Logger logger = Logger.getLogger(ItemRetrieve.class); protected static Logger logger = Logger.getLogger(ItemRetrieve.class);
@ -47,10 +47,10 @@ public class ItemRetrieve {
try { try {
Workspace ws = getWorkspace(); Workspace ws = getWorkspace();
System.out.println(ws.getRoot().getId());
// retrieveFirstLevel(ws, null);
retrieveFirstLevel(ws, null); retrieveFirstLevel(ws, ITEMID);
// retrieveFirstLevel(ws, ITEMID);
System.out.println("get workspace -> OK"); System.out.println("get workspace -> OK");
// WorkspaceItem item = ws.getItem(ITEMID); // WorkspaceItem item = ws.getItem(ITEMID);
@ -134,7 +134,7 @@ public class ItemRetrieve {
WorkspaceFolder folder = (WorkspaceFolder) workspaceItem; WorkspaceFolder folder = (WorkspaceFolder) workspaceItem;
System.out.println(++i+") "+folder.getId() +" folder name: "+folder.getName() + " owner "+folder.getOwner()); System.out.println(++i+") "+folder.getId() +" folder name: "+folder.getName() + " owner "+folder.getOwner() +" path: "+folder.getPath());
foldersCounter++; foldersCounter++;
break; break;
@ -143,7 +143,7 @@ public class ItemRetrieve {
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) workspaceItem; WorkspaceSharedFolder shared = (WorkspaceSharedFolder) workspaceItem;
System.out.println(++i+") "+shared.getId() +" shared folder name: "+shared.getName() + " owner "+shared.getOwner()+" isVRE "+shared.isVreFolder() +" ACLOwner: "+shared.getACLOwner()+" AclUser: "+shared.getACLUser()); System.out.println(++i+") "+shared.getId() +" shared folder name: "+shared.getName() + " owner "+shared.getOwner()+" isVRE "+shared.isVreFolder() +" ACLOwner: "+shared.getACLOwner()+" AclUser: "+shared.getACLUser() +" path: "+shared.getPath());
// System.out.println(++i+") shared folder name: "+shared.getName() + " owner "+shared.getOwner().getPortalLogin()); // System.out.println(++i+") shared folder name: "+shared.getName() + " owner "+shared.getOwner().getPortalLogin());
sharedFoldersCounter++; sharedFoldersCounter++;
@ -154,13 +154,13 @@ public class ItemRetrieve {
FolderItem folderItem = (FolderItem) workspaceItem; FolderItem folderItem = (FolderItem) workspaceItem;
System.out.println(++i+") folderItem id: "+folderItem.getId() +", name: "+folderItem.getName() + ", own: "+folderItem.getOwner()); System.out.println(++i+") folderItem id: "+folderItem.getId() +", name: "+folderItem.getName() + ", own: "+folderItem.getOwner() +" path: "+folderItem.getPath());
folderItemCounter++; folderItemCounter++;
break; break;
default: default:
System.out.println(++i+") DEFAULT - item id: "+workspaceItem.getId() +", name: "+workspaceItem.getName() + ", own: "+workspaceItem.getOwner()); // System.out.println(++i+") DEFAULT - item id: "+workspaceItem.getId() +", name: "+workspaceItem.getName() + ", own: "+workspaceItem.getOwner());
othersCounter++; // othersCounter++;
break; break;
} }
} }