git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@167688 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ebfbd93182
commit
0977484ebc
2
pom.xml
2
pom.xml
|
@ -60,7 +60,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>storagehub-support-library</artifactId>
|
||||
<artifactId>storagehub-icons-library</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,)</version>
|
||||
</dependency>
|
||||
<!-- Google Web Toolkit (GWT) -->
|
||||
|
|
|
@ -42,6 +42,6 @@ public class WorkspaceExplorerConstants {
|
|||
|
||||
public static final WorkspaceExplorerServiceAsync workspaceNavigatorService = GWT.create(WorkspaceExplorerService.class);
|
||||
|
||||
public static int ITEMS_PER_PAGE = 20;
|
||||
public static int ITEMS_PER_PAGE = 10;
|
||||
public static int ITEM_START_INDEX = 0;
|
||||
}
|
||||
|
|
|
@ -127,35 +127,6 @@ public class WorkspaceExplorerPaginated extends WorkspaceExplorer{
|
|||
|
||||
final boolean purgeEmpyFolders = !showEmptyFolders;
|
||||
|
||||
// //IF IS INIT OR A DOUBLE CLICK
|
||||
// if(getDisplayingFolderItem()==null || getDisplayingFolderItem().getId()!=item.getId()){
|
||||
// GWT.log("Performing Get Folder Children Count ");
|
||||
// WorkspaceExplorerConstants.workspaceNavigatorService.getFolderChildrenCount(item, new AsyncCallback<Integer>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(Throwable caught) {
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(final Integer result) {
|
||||
// GWT.log("Folder Children count: "+result);
|
||||
//
|
||||
// int newStartIndex = startIdx;
|
||||
// getAsycnDataProvider().updateRowCount(result, true);
|
||||
//
|
||||
// if(newLoading){
|
||||
// GWT.log("Cleaning all data...");
|
||||
// newStartIndex = 0;
|
||||
// GWT.log("Store reset performed start index is: "+newStartIndex);
|
||||
// }
|
||||
//
|
||||
// //final Range range = display.getVisibleRange();
|
||||
// perfomGetFolderChildren(item, loadGcubeProperties, newStartIndex, limit, purgeEmpyFolders, showableTypesParam);
|
||||
// }
|
||||
// });
|
||||
// }else
|
||||
// perfomGetFolderChildren(item, loadGcubeProperties, startIdx, limit, purgeEmpyFolders, showableTypesParam);
|
||||
|
||||
int newStartIndex = startIdx;
|
||||
|
||||
if(newLoading){
|
||||
|
|
|
@ -149,11 +149,6 @@ public class ItemBuilder {
|
|||
// _log.debug("Building Item for: "+itemName);
|
||||
org.gcube.portlets.widgets.wsexplorer.shared.Item item = null;
|
||||
try{
|
||||
//THIS CALL IS VERY SLOW!!
|
||||
// String storageID = null;
|
||||
// if(workspaceItem instanceof FolderItem){
|
||||
// storageID = workspaceItem.getStorageID();
|
||||
// }
|
||||
item = new org.gcube.portlets.widgets.wsexplorer.shared.Item(
|
||||
parent, workspaceItem.getId(), itemName, type, workspaceItemPath,
|
||||
UserUtil.getUserFullName(workspaceItem.getOwner()), toDate(workspaceItem.getCreationTime()), isFolder, false);
|
||||
|
@ -172,7 +167,7 @@ public class ItemBuilder {
|
|||
String itemId = item.getId();
|
||||
ItemManagerClient client = AbstractPlugin.item().build();
|
||||
List<? extends Item> theChildren = null;
|
||||
theChildren = client.getChildren(itemId, Whorespace.ACCOUNTING_HL_NODE_NAME);
|
||||
theChildren = client.getChildren(itemId, startIdx, limit, Whorespace.ACCOUNTING_HL_NODE_NAME);
|
||||
for (Item child : theChildren) {
|
||||
String itemPath = workspaceItemPath+"/"+child.getName();
|
||||
org.gcube.portlets.widgets.wsexplorer.shared.Item itemChild = getItem(item, child, itemPath, showableTypes, filterCriteria, false, loadGcubeProperties);
|
||||
|
|
|
@ -551,10 +551,7 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
Item folder = Whorespace.getItem(getThreadLocalRequest(), item.getId());
|
||||
|
||||
int searchStartIndex = startIndex < serverStartIndex? serverStartIndex : startIndex;
|
||||
//logger.trace("GetFolder - Replyiing folder");
|
||||
_log.debug("MyLg getFolder searchIndex: "+searchStartIndex+", limit: "+limit);
|
||||
//long startTime = System.currentTimeMillis();
|
||||
//logger.trace("start time - " + startTime);
|
||||
_log.debug("MyLg getFolder searchIndex: "+searchStartIndex+", limit: "+limit);
|
||||
|
||||
//TO AVOID SLOW CALL getPATH()
|
||||
String folderPath = item.getPath()!=null && !item.getPath().isEmpty()?item.getPath():folder.getPath();
|
||||
|
@ -624,16 +621,6 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
|||
itemFolderToReturn = ItemBuilder.purgeEmptyFolders(sf.getFolder());
|
||||
}
|
||||
|
||||
//logger.debug("Returning: "+itemFolder.getChildren().size() + " items");
|
||||
//Long endTime = System.currentTimeMillis() - startTime;
|
||||
//String time = String.format("%d msc %d sec", endTime, TimeUnit.MILLISECONDS.toSeconds(endTime));
|
||||
//logger.debug("end time - " + time);
|
||||
|
||||
// int i = 0;
|
||||
// for (Item item2 : sf.getFolder().getChildren()) {
|
||||
// logger.debug(++i+") "+item2);
|
||||
// }
|
||||
|
||||
Collections.sort(itemFolderToReturn.getChildren(), new ItemComparator());
|
||||
_log.debug("Returning: "+sf);
|
||||
return sf;
|
||||
|
|
Loading…
Reference in New Issue