2099: Workspace Explorer enhancements: create a new folder
Task-Url: https://support.d4science.org/issues/2099 Fixed issue on getParent git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@122727 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ea3b77fee2
commit
379ffc008d
|
@ -614,21 +614,16 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
||||||
|
|
||||||
Workspace workspace = getWorkspace();
|
Workspace workspace = getWorkspace();
|
||||||
WorkspaceFolder wsFolder = workspace.createFolder(nameFolder, description, parentId);
|
WorkspaceFolder wsFolder = workspace.createFolder(nameFolder, description, parentId);
|
||||||
Item itemFolder = null;
|
|
||||||
List<ItemType> allTypes = Arrays.asList(ItemType.values());
|
List<ItemType> allTypes = Arrays.asList(ItemType.values());
|
||||||
|
|
||||||
WorkspaceFolder parentFolder = null;
|
Item parent = null;
|
||||||
try{
|
try{
|
||||||
parentFolder = wsFolder.getParent();
|
parent = ItemBuilder.getItem(null, wsFolder.getParent(), allTypes, null, false);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
_log.error("Get parent thown an exception, is it the root id? "+parentId);
|
_log.error("Get parent thown an exception, is it the root id? "+parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Item parent = ItemBuilder.getItem(null, parentFolder, allTypes, null, false);
|
return ItemBuilder.getItem(parent, wsFolder, allTypes, null, false);
|
||||||
if(parent!=null){
|
|
||||||
itemFolder = ItemBuilder.getItem(parent, wsFolder, allTypes, null, false);
|
|
||||||
}
|
|
||||||
return itemFolder;
|
|
||||||
|
|
||||||
} catch(InsufficientPrivilegesException e){
|
} catch(InsufficientPrivilegesException e){
|
||||||
String error = "Insufficient Privileges to create the folder";
|
String error = "Insufficient Privileges to create the folder";
|
||||||
|
|
Loading…
Reference in New Issue