Subversion Repositories eFlore/Applications.del

Rev

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

Rev 975 Rev 1496
Line 6... Line 6...
6
import org.tela_botanica.del.client.services.rest.async.AjoutCommentaireCallback;
6
import org.tela_botanica.del.client.services.rest.async.AjoutCommentaireCallback;
7
import org.tela_botanica.del.client.services.rest.async.ListeCommentairesCallback;
7
import org.tela_botanica.del.client.services.rest.async.ListeCommentairesCallback;
8
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
8
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
9
import org.tela_botanica.del.client.services.rest.async.SuppressionCommentaireCallback;
9
import org.tela_botanica.del.client.services.rest.async.SuppressionCommentaireCallback;
Line 10... Line 10...
10
 
10
 
11
import com.google.gwt.http.client.RequestBuilder;
11
import org.tela_botanica.del.client.services.RequestBuilderWithCredentials;
Line 12... Line 12...
12
import com.google.gwt.http.client.URL;
12
import com.google.gwt.http.client.URL;
Line 13... Line 13...
13
 
13
 
Line 26... Line 26...
26
	
26
	
27
	@Override
27
	@Override
Line 28... Line 28...
28
	public void ajouterCommentaire(Commentaire commentaire, AjoutCommentaireCallback callback) {
28
	public void ajouterCommentaire(Commentaire commentaire, AjoutCommentaireCallback callback) {
29
		
29
		
Line 30... Line 30...
30
		String urlService = baseUrl+"commentaires/";
30
		String urlService = baseUrl+"commentaires/";
31
		RequestBuilder rb = new RequestBuilder(RequestBuilder.PUT, urlService);
31
		RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.PUT, urlService);
32
		
32
		
33
		callback.setMode(ModeRequete.AJOUT);
33
		callback.setMode(ModeRequete.AJOUT);
Line 63... Line 63...
63
		return chaineRequete;
63
		return chaineRequete;
64
	}
64
	}
Line 65... Line 65...
65
 
65
 
66
	public void chargerCommentaires(PropositionDetermination propositionDetermination, ListeCommentairesCallback commentaireCallback) {
66
	public void chargerCommentaires(PropositionDetermination propositionDetermination, ListeCommentairesCallback commentaireCallback) {
67
		String urlService = baseUrl+"commentaires/?masque.proposition="+propositionDetermination.getId();
67
		String urlService = baseUrl+"commentaires/?masque.proposition="+propositionDetermination.getId();
Line 68... Line 68...
68
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, urlService);
68
		RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET, urlService);
Line 69... Line 69...
69
		
69
		
70
		commentaireCallback.setMode(ModeRequete.LECTURE);
70
		commentaireCallback.setMode(ModeRequete.LECTURE);
Line 79... Line 79...
79
	@Override
79
	@Override
80
	public void supprimerCommentaire(Commentaire commentaire,
80
	public void supprimerCommentaire(Commentaire commentaire,
81
			SuppressionCommentaireCallback callback) {
81
			SuppressionCommentaireCallback callback) {
Line 82... Line 82...
82
		
82
		
83
		String urlService = baseUrl+"commentaires/"+commentaire.getId();
83
		String urlService = baseUrl+"commentaires/"+commentaire.getId();
Line 84... Line 84...
84
		RequestBuilder rb = new RequestBuilder(RequestBuilder.DELETE, urlService);
84
		RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.DELETE, urlService);
85
		
85
		
86
		callback.setMode(ModeRequete.SUPPRESSION);
86
		callback.setMode(ModeRequete.SUPPRESSION);
87
		try {
87
		try {