Subversion Repositories eFlore/Applications.cel

Rev

Rev 140 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
157 aurelien 1
package org.tela_botanica.client.modeles;
140 aurelien 2
 
157 aurelien 3
import org.tela_botanica.client.observation.ObservationModele;
140 aurelien 4
 
5
import com.google.gwt.http.client.Request;
6
import com.google.gwt.http.client.RequestBuilder;
7
import com.google.gwt.http.client.RequestCallback;
8
import com.google.gwt.http.client.RequestException;
9
import com.google.gwt.http.client.Response;
10
 
11
public class ImportObservationAsynchroneDAO {
12
 
13
	private ObservationModele oModele = null ;
14
 
15
	public ImportObservationAsynchroneDAO(ObservationModele observationModele) {
16
		oModele = observationModele;
17
	}
18
 
19
	public void importerObservations() {
20
 
21
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, Configuration.getServiceBaseUrl()
22
				+ "/InventoryImport/" + oModele.getIdentifiant());
23
 
24
		try {
25
			rb.sendRequest(null, new RequestCallback() {
26
 
27
				public void onError(Request request, Throwable exception) {
28
					// TODO Auto-generated method stub
29
 
30
				}
31
 
32
				public void onResponseReceived(Request request,
33
						Response response) {
34
 
35
					if(response.getText().equals("OK")) {
36
 
37
					}
38
					else
39
					{
40
 
41
					}
42
 
43
				}
44
 
45
			});
46
		} catch (RequestException e) {
47
			// TODO Auto-generated catch block
48
			e.printStackTrace();
49
		}
50
 
51
	}
52
 
53
}