Subversion Repositories eFlore/Applications.del

Rev

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

Rev 939 Rev 975
Line 1... Line 1...
1
package org.tela_botanica.del.client.services.rest;
1
package org.tela_botanica.del.client.services.rest;
Line 2... Line 2...
2
 
2
 
-
 
3
import org.tela_botanica.del.client.config.Config;
3
import org.tela_botanica.del.client.config.Config;
4
import org.tela_botanica.del.client.modeles.Commentaire;
4
import org.tela_botanica.del.client.modeles.PropositionDetermination;
5
import org.tela_botanica.del.client.modeles.PropositionDetermination;
5
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
6
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
-
 
7
import org.tela_botanica.del.client.services.rest.async.PropositionDeterminationCallBack;
-
 
8
import org.tela_botanica.del.client.services.rest.async.SuppressionCommentaireCallback;
Line 6... Line 9...
6
import org.tela_botanica.del.client.services.rest.async.PropositionDeterminationCallBack;
9
import org.tela_botanica.del.client.services.rest.async.SuppressionPropositionDeterminationCallback;
7
 
10
 
Line 8... Line 11...
8
import com.google.gwt.http.client.RequestBuilder;
11
import com.google.gwt.http.client.RequestBuilder;
Line 66... Line 69...
66
			chaineRequete += "&texte="+URL.encodeQueryString(proposition.getCommentaire());
69
			chaineRequete += "&texte="+URL.encodeQueryString(proposition.getCommentaire());
67
		}
70
		}
Line 68... Line 71...
68
 
71
 
69
		return chaineRequete;
72
		return chaineRequete;
-
 
73
	}
-
 
74
 
-
 
75
	@Override
-
 
76
	public void supprimerProposition(PropositionDetermination proposition, SuppressionPropositionDeterminationCallback callback) {
-
 
77
		
-
 
78
		String urlService = baseUrl+"commentaires/"+proposition.getId();
-
 
79
		RequestBuilder rb = new RequestBuilder(RequestBuilder.DELETE, urlService);
-
 
80
		
-
 
81
		callback.setMode(ModeRequete.SUPPRESSION);
-
 
82
		try {
-
 
83
			rb.sendRequest(null, callback);
-
 
84
		} catch (Exception e) {
-
 
85
			//TODO: quoi faire si la requete est mal formée coté client avant d'être envoyée ?
-
 
86
		}
70
	}
87
	}