Implemeted empty trash with the new API call
[pithos-web-client] / src / gr / grnet / pithos / web / client / commands / EmptyTrashCommand.java
index 6bf19a9..71fbff0 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
 package gr.grnet.pithos.web.client.commands;
 
 import gr.grnet.pithos.web.client.Pithos;
 package gr.grnet.pithos.web.client.commands;
 
 import gr.grnet.pithos.web.client.Pithos;
+import gr.grnet.pithos.web.client.foldertree.File;
+import gr.grnet.pithos.web.client.foldertree.Folder;
+import gr.grnet.pithos.web.client.foldertree.Resource;
+import gr.grnet.pithos.web.client.rest.DeleteRequest;
+import gr.grnet.pithos.web.client.rest.GetRequest;
+import gr.grnet.pithos.web.client.rest.RestException;
 
 
+import java.util.Iterator;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.http.client.URL;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.ui.PopupPanel;
 
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.ui.PopupPanel;
 
@@ -46,7 +58,7 @@ import com.google.gwt.user.client.ui.PopupPanel;
 public class EmptyTrashCommand implements Command{
        private PopupPanel containerPanel;
 
 public class EmptyTrashCommand implements Command{
        private PopupPanel containerPanel;
 
-    private Pithos app;
+    Pithos app;
 
        public EmptyTrashCommand(Pithos _app, PopupPanel _containerPanel){
         app = _app;
 
        public EmptyTrashCommand(Pithos _app, PopupPanel _containerPanel){
         app = _app;
@@ -57,5 +69,7 @@ public class EmptyTrashCommand implements Command{
        public void execute() {
                if (containerPanel != null)
                        containerPanel.hide();
        public void execute() {
                if (containerPanel != null)
                        containerPanel.hide();
+               
+               app.emptyTrash();
        }
 }
        }
 }