Revision 023f6f1e src/gr/ebs/gss/client/rest/MultiplePostCommand.java
b/src/gr/ebs/gss/client/rest/MultiplePostCommand.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
import com.google.gwt.core.client.GWT; |
30 | 30 |
import com.google.gwt.http.client.Request; |
31 |
import com.google.gwt.http.client.RequestBuilder; |
|
31 | 32 |
import com.google.gwt.http.client.RequestCallback; |
32 | 33 |
import com.google.gwt.http.client.Response; |
33 | 34 |
|
... | ... | |
64 | 65 |
paths = pathToDelete; |
65 | 66 |
for (final String pathg : pathToDelete) { |
66 | 67 |
GWT.log("[DEL]"+pathg, null); |
67 |
RestRequestBuilder builder = new RestRequestBuilder("POST", pathg);
|
|
68 |
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, pathg);
|
|
68 | 69 |
|
69 | 70 |
try { |
70 | 71 |
handleHeaders(builder, pathg); |
71 | 72 |
builder.sendRequest(data, new RequestCallback() { |
72 | 73 |
|
74 |
@Override |
|
73 | 75 |
public void onError(Request arg0, Throwable arg1) { |
74 | 76 |
errors.put(pathg, arg1); |
75 | 77 |
} |
76 | 78 |
|
79 |
@Override |
|
77 | 80 |
public void onResponseReceived(Request arg0, Response arg1) { |
78 | 81 |
if (arg1.getStatusCode() == okStatusCode) |
79 | 82 |
successPaths.add(pathg); |
... | ... | |
96 | 99 |
return errors.size() + successPaths.size() == paths.length; |
97 | 100 |
} |
98 | 101 |
|
102 |
@Override |
|
99 | 103 |
public boolean execute() { |
100 | 104 |
boolean com = isComplete(); |
101 | 105 |
if (com) { |
Also available in: Unified diff