optimized code to getSearchItems
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@120255 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5d79855f6b
commit
ccaaa5c9f0
|
@ -1234,8 +1234,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
WorkspaceSmartFolder wsSmartFolder = workspace.getSmartFolder(folderId); //get Smart Folder from workspace
|
WorkspaceSmartFolder wsSmartFolder = workspace.getSmartFolder(folderId); //get Smart Folder from workspace
|
||||||
workspaceLogger.trace("wsFolder " + wsSmartFolder.getName());
|
workspaceLogger.trace("wsFolder " + wsSmartFolder.getName());
|
||||||
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
||||||
workspaceLogger.trace(" children size "+wsSmartFolder.getSearchItems().size());
|
|
||||||
return builder.buildGXTListFileGridModelItemForSearch((List<SearchItem>) wsSmartFolder.getSearchItems());
|
List<? extends SearchItem> searchItems = wsSmartFolder.getSearchItems();
|
||||||
|
|
||||||
|
if(searchItems!=null){
|
||||||
|
workspaceLogger.trace("smart folders size "+searchItems.size());
|
||||||
|
return builder.buildGXTListFileGridModelItemForSearch((List<SearchItem>) searchItems);
|
||||||
|
}else
|
||||||
|
return new ArrayList<FileGridModel>();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
workspaceLogger.error("Error in get server smart folder by id", e);
|
workspaceLogger.error("Error in get server smart folder by id", e);
|
||||||
|
|
Loading…
Reference in New Issue