New file |
0,0 → 1,44 |
package org.tela_botanica.del.client.services.rest.async; |
|
import java.util.ArrayList; |
import java.util.List; |
|
import org.tela_botanica.del.client.modeles.Image; |
import org.tela_botanica.del.client.modeles.ImageServiceResultat; |
import org.tela_botanica.del.client.modeles.Observation; |
|
import com.google.gwt.http.client.Request; |
import com.google.gwt.http.client.RequestCallback; |
import com.google.gwt.http.client.Response; |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.json.client.JSONParser; |
import com.google.gwt.json.client.JSONValue; |
|
public abstract class ImagesParTaxonCallback implements RequestCallback { |
|
public ImagesParTaxonCallback() { |
|
} |
|
@Override |
public void onResponseReceived(Request request, Response response) { |
ImageServiceResultat imagesRecues = convertirReponseVersListeImage(response); |
surImagesRecues(imagesRecues); |
} |
|
@Override |
public void onError(Request request, Throwable exception) { |
// TODO Auto-generated method stub |
|
} |
|
public abstract void surImagesRecues(ImageServiceResultat imagesRecues); |
|
private ImageServiceResultat convertirReponseVersListeImage(Response reponse) { |
ImageServiceResultat resultat = new ImageServiceResultat(JSONParser.parseStrict(reponse.getText())); |
return resultat; |
} |
|
|
} |