Revision f55cf326 web_client/src/gr/grnet/pithos/web/client/DeleteFileDialog.java
b/web_client/src/gr/grnet/pithos/web/client/DeleteFileDialog.java | ||
---|---|---|
38 | 38 |
import gr.grnet.pithos.web.client.MessagePanel.Images; |
39 | 39 |
import gr.grnet.pithos.web.client.foldertree.File; |
40 | 40 |
import gr.grnet.pithos.web.client.foldertree.Resource; |
41 |
import gr.grnet.pithos.web.client.rest.DeleteCommand; |
|
42 | 41 |
import gr.grnet.pithos.web.client.rest.DeleteRequest; |
43 |
import gr.grnet.pithos.web.client.rest.MultipleDeleteCommand; |
|
44 | 42 |
import gr.grnet.pithos.web.client.rest.RestException; |
45 |
import gr.grnet.pithos.web.client.rest.resource.FileResource; |
|
46 | 43 |
|
47 |
import java.util.ArrayList; |
|
48 | 44 |
import java.util.Iterator; |
49 | 45 |
import java.util.List; |
50 | 46 |
|
... | ... | |
53 | 49 |
import com.google.gwt.event.dom.client.ClickEvent; |
54 | 50 |
import com.google.gwt.event.dom.client.ClickHandler; |
55 | 51 |
import com.google.gwt.event.dom.client.KeyCodes; |
56 |
import com.google.gwt.user.client.DeferredCommand; |
|
57 | 52 |
import com.google.gwt.user.client.Event.NativePreviewEvent; |
58 | 53 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
59 | 54 |
import com.google.gwt.user.client.ui.Button; |
... | ... | |
134 | 129 |
private void deleteFile(final Iterator<File> iter) { |
135 | 130 |
if (iter.hasNext()) { |
136 | 131 |
File f = iter.next(); |
137 |
String path = GSS.get().getApiPath() + GSS.get().getUsername() + f.getUri();
|
|
132 |
String path = Pithos.get().getApiPath() + Pithos.get().getUsername() + f.getUri();
|
|
138 | 133 |
DeleteRequest deleteFile = new DeleteRequest(path) { |
139 | 134 |
@Override |
140 | 135 |
public void onSuccess(Resource result) { |
... | ... | |
145 | 140 |
public void onError(Throwable t) { |
146 | 141 |
GWT.log("", t); |
147 | 142 |
if (t instanceof RestException) { |
148 |
GSS.get().displayError("Unable to delete file: " + ((RestException) t).getHttpStatusText());
|
|
143 |
Pithos.get().displayError("Unable to delete file: " + ((RestException) t).getHttpStatusText());
|
|
149 | 144 |
} |
150 | 145 |
else |
151 |
GSS.get().displayError("System error unable to delete file: "+t.getMessage());
|
|
146 |
Pithos.get().displayError("System error unable to delete file: "+t.getMessage());
|
|
152 | 147 |
} |
153 | 148 |
}; |
154 |
deleteFile.setHeader("X-Auth-Token", GSS.get().getToken());
|
|
149 |
deleteFile.setHeader("X-Auth-Token", Pithos.get().getToken());
|
|
155 | 150 |
Scheduler.get().scheduleDeferred(deleteFile); |
156 | 151 |
} |
157 | 152 |
else { |
158 |
GSS.get().updateFolder(files.get(0).getParent());
|
|
153 |
Pithos.get().updateFolder(files.get(0).getParent());
|
|
159 | 154 |
} |
160 | 155 |
} |
161 | 156 |
|
Also available in: Unified diff