added new log

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@124734 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-03-01 17:06:45 +00:00
parent 3fe9d27f31
commit 704a4edafe
1 changed files with 9 additions and 2 deletions

View File

@ -619,6 +619,9 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
Workspace workspace = getWorkspace();
WorkspaceFolder wsFolder = workspace.createFolder(nameFolder, description, parentId);
// _log.info("Path returned by HL: "+wsFolder.getPath());
List<ItemType> allTypes = Arrays.asList(ItemType.values());
Item parent = null;
@ -633,9 +636,13 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
String itemPath = null;
try{
itemPath = wsFolder.getPath();
_log.info("itemPath: "+itemPath);
}catch(Exception e){
_log.error("Get path thown an exception, for id: "+wsFolder.getId());
itemPath= wsFolder.isFolder()?workspace.getRoot().getPath()+"/"+wsFolder.getName():workspace.getRoot().getPath();
_log.error("Get path thrown an exception, for id: "+wsFolder.getId() +" name: "+wsFolder.getName(), e);
// itemPath= wsFolder.isFolder()?workspace.getRoot().getPath()+"/"+wsFolder.getName():workspace.getRoot().getPath();
//PATCH TO RETURN ABSOLUTE PATH
itemPath= workspace.getRoot().getPath()+"/"+wsFolder.getName();
_log.warn("returning base path: "+itemPath);
}
return ItemBuilder.getItem(parent, wsFolder, itemPath, allTypes, null, false);