Subversion Repositories eFlore/Applications.del

Rev

Rev 814 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 814 Rev 939
Line 1... Line 1...
1
package org.tela_botanica.del.client.services.rest.async;
1
package org.tela_botanica.del.client.services.rest.async;
Line 2... Line 2...
2
 
2
 
Line 3... Line -...
3
import org.tela_botanica.del.client.modeles.ProtocoleServiceResultat;
-
 
4
 
-
 
5
import com.google.gwt.http.client.Request;
-
 
6
import com.google.gwt.http.client.RequestCallback;
3
import org.tela_botanica.del.client.modeles.ProtocoleServiceResultat;
7
import com.google.gwt.http.client.Response;
-
 
Line 8... Line 4...
8
import com.google.gwt.json.client.JSONParser;
4
 
9
import com.google.gwt.user.client.Window;
-
 
10
 
-
 
11
public abstract class ProtocolesCallback implements RequestCallback {
-
 
12
 
-
 
Line 13... Line 5...
13
	public ProtocolesCallback() {
5
import com.google.gwt.json.client.JSONParser;
14
 
-
 
15
	}
-
 
16
 
-
 
17
	@Override
-
 
18
	public void onResponseReceived(Request request, Response response) {
-
 
19
		ProtocoleServiceResultat protocolesRecus = convertirReponseVersListeProtocoles(response);
-
 
20
		surProtocolesRecus(protocolesRecus);
-
 
21
	}
-
 
22
 
-
 
23
	@Override
-
 
24
	public void onError(Request request, Throwable exception) {
-
 
25
		Window.alert(exception.getMessage());
-
 
26
	}
6
 
27
 
7
public abstract class ProtocolesCallback extends PHPCallback<ProtocoleServiceResultat> {
28
	public abstract void surProtocolesRecus(ProtocoleServiceResultat protocolesRecus);
-
 
29
 
8
 
Line 30... Line 9...
30
	private ProtocoleServiceResultat convertirReponseVersListeProtocoles(Response reponse) {
9
	@Override
31
		ProtocoleServiceResultat resultat = new ProtocoleServiceResultat(JSONParser.parseStrict(reponse.getText()));
10
	public ProtocoleServiceResultat parserJSON(String retourService) {