Subversion Repositories eFlore/Archives.cel-v2

Rev

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

Rev 27 Rev 28
Line 1... Line 1...
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
Line -... Line 2...
-
 
2
 
-
 
3
import java.util.HashMap;
-
 
4
import java.util.Iterator;
-
 
5
 
-
 
6
import org.tela_botanica.client.image.ImageMediateur;
-
 
7
import org.tela_botanica.client.interfaces.Rafraichissable;
-
 
8
 
-
 
9
import com.google.gwt.user.client.HTTPRequest;
-
 
10
import com.google.gwt.user.client.ResponseTextHandler;
-
 
11
import com.google.gwt.user.client.Window;
-
 
12
import com.gwtext.client.widgets.tree.TreeNode;
2
 
13
 
-
 
14
public class MotsClesAsynchroneDAO {
-
 
15
	
-
 
16
	private ImageMediateur iMediateur = null ;
-
 
17
	
-
 
18
	public void setIMediateur(ImageMediateur im)
-
 
19
	{
-
 
20
		iMediateur = im ; 
-
 
21
	}
-
 
22
	
-
 
23
	public void obtenirListeMotsCles(Rafraichissable r)
-
 
24
	{
-
 
25
		HTTPRequest.asyncGet("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant(), new ResponseTextHandler() {
-
 
26
 
-
 
27
			public void onCompletion(String responseText) {
-
 
28
				// TODO Auto-generated method stub
-
 
29
				
-
 
30
			}
-
 
31
			
-
 
32
		});
-
 
33
	}
-
 
34
	
-
 
35
	
-
 
36
	public void ajouterBaseDeDonnees(String motcle)
-
 
37
	{
-
 
38
		if(!motcle.equals(""))
-
 
39
		{
-
 
40
			String postData = motcle ;
-
 
41
			
-
 
42
			HTTPRequest.asyncPost("jrest/InventoryKeyWordList/","&identifiant="+iMediateur.getIdentifiant()+postData, new ResponseTextHandler() {
-
 
43
	
-
 
44
				public void onCompletion(String responseText) {
-
 
45
				
-
 
46
				}
-
 
47
				
-
 
48
			}) ;
-
 
49
		}
-
 
50
	} 
-
 
51
	
-
 
52
	public void supprimerBaseDeDonnees(String motcle)
-
 
53
	{
-
 
54
		if(!motcle.equals(""))
-
 
55
		{
-
 
56
			String postData = "" ;
-
 
57
			postData += "&action=DELETE" ;
-
 
58
			
-
 
59
			HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant()+"/"+motcle,postData, new ResponseTextHandler() {
-
 
60
	
-
 
61
				public void onCompletion(String responseText) {
-
 
62
					
-
 
63
					
-
 
64
				}
-
 
65
				
-
 
66
			}) ;
-
 
67
		}
-
 
68
	}
-
 
69
 
-
 
70
	public void modifierBaseDeDonnees(String motcle) {
-
 
71
		
-
 
72
		if(!motcle.equals(""))
-
 
73
		{
-
 
74
 
-
 
75
		String postData = "" ;
-
 
76
		postData += "&action=modification"+motcle ;
-
 
77
			
-
 
78
		HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant() ,postData, new ResponseTextHandler() {
-
 
79
	
-
 
80
				public void onCompletion(String responseText) {
-
 
81
					
-
 
82
					Window.alert(responseText) ;
-
 
83
					
-
 
84
				}
-
 
85
				
-
 
86
			}) ;
-
 
87
		}
-
 
88
		
-
 
89
	}
-
 
90
	
-
 
91
public void deplacerBaseDeDonnees(String motcle) {
-
 
92
		
-
 
93
		if(!motcle.equals(""))
-
 
94
		{
-
 
95
 
-
 
96
		String postData = "" ;
-
 
97
		postData += "&action=deplacement"+motcle ;
-
 
98
			
-
 
99
		HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant() ,postData, new ResponseTextHandler() {
-
 
100
	
-
 
101
				public void onCompletion(String responseText) {
-
 
102
					
-
 
103
					Window.alert(responseText) ;
-
 
104
					
-
 
105
				}
-
 
106
				
-
 
107
			}) ;
-
 
108
		}
-
 
109
		
Line 3... Line 110...
3
public class MotsClesAsynchroneDAO {
110
	}