1270: Workspace improvements: many rpc calls after an delete multiple

Task-Url: https://support.d4science.org/issues/1270

Fixed this task

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@120109 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-10-29 17:00:06 +00:00
parent a481378eb0
commit 3b6f44bb12
2 changed files with 8 additions and 14 deletions

View File

@ -1858,20 +1858,18 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
}else if(event instanceof DeleteItemEvent){
DeleteItemEvent deleteEvent = (DeleteItemEvent) event;
sub.deleteItem(deleteEvent.getFileTarget().getIdentifier());
List<String> ids = new ArrayList<String>(1);
ids.add(deleteEvent.getFileTarget().getIdentifier());
sub.deleteItems(ids);
}else if(event instanceof SelectedItemEvent){
SelectedItemEvent selectedEvent = (SelectedItemEvent) event;
// ArrayList<FileModel> listFileModel = getListParentsByIdentifier(selectedEvent.getFileTarget().getIdentifier());
List<FileModel> listFileModel = new ArrayList<FileModel>();
FileModel item = explorerPanel.getAsycTreePanel().getFileModelByIdentifier(selectedEvent.getFileTarget().getIdentifier());
// System.out.println("selected item is "+item);
listFileModel = getListParents(listFileModel,item); //used for update path bar
sub.selectedItem(selectedEvent.getFileTarget(), listFileModel);
@ -1946,8 +1944,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
SendMessageEvent messageEvent = (SendMessageEvent) event;
// sub.updatePrevieMessage(messageEvent.getMessage().getFromLogin(), messageEvent.getMessage().getSubject(), messageEvent.getMessage().getDate(), messageEvent.getMessage().getTextMessage(), messageEvent.getMessage().getListAttachments());
HashMap<String, String> hashFiles = new HashMap<String, String>();
if(messageEvent.getListFileModelSelected()!=null){
@ -1961,11 +1957,8 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
OpenMessageEvent messageEvent = (OpenMessageEvent) event;
// sub.updatePrevieMessage(messageEvent.getMessage().getFromLogin(), messageEvent.getMessage().getSubject(), messageEvent.getMessage().getDate(), messageEvent.getMessage().getTextMessage(), messageEvent.getMessage().getListAttachments());
MessageModel message = messageEvent.getMessage();
}else if(event instanceof FileDownloadEvent){
FileDownloadEvent messageEvent = (FileDownloadEvent) event;

View File

@ -27,7 +27,7 @@ public interface SubscriberInterface {
* @param itemIdentifier the item identifier
* @param parentId the parent
* @param file the file
* @param isOverwrite
* @param isOverwrite the is overwrite
*/
void addedFile(String itemIdentifier, String parentId, WS_UPLOAD_TYPE file, boolean isOverwrite);
@ -63,13 +63,14 @@ public interface SubscriberInterface {
*/
boolean renameItem(String itemIdentifier, String newName, String extension);
/**
* Delete item.
* Delete items.
*
* @param itemIdentifier the item identifier
* @param itemsIdentifier the items identifier
* @return true, if successful
*/
boolean deleteItem(String itemIdentifier);
boolean deleteItems(List<String> ids);
/**
* Added folder.