Rev 27 | Rev 36 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.client.modeles;
import java.util.HashMap;
import java.util.Iterator;
import org.tela_botanica.client.image.ImageMediateur;
import org.tela_botanica.client.interfaces.Rafraichissable;
import com.google.gwt.user.client.HTTPRequest;
import com.google.gwt.user.client.ResponseTextHandler;
import com.google.gwt.user.client.Window;
import com.gwtext.client.widgets.tree.TreeNode;
public class MotsClesAsynchroneDAO {
private ImageMediateur iMediateur = null ;
public void setIMediateur(ImageMediateur im)
{
iMediateur = im ;
}
public void obtenirListeMotsCles(Rafraichissable r)
{
HTTPRequest.asyncGet("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant(), new ResponseTextHandler() {
public void onCompletion(String responseText) {
// TODO Auto-generated method stub
}
});
}
public void ajouterBaseDeDonnees(String motcle)
{
if(!motcle.equals(""))
{
String postData = motcle ;
HTTPRequest.asyncPost("jrest/InventoryKeyWordList/","&identifiant="+iMediateur.getIdentifiant()+postData, new ResponseTextHandler() {
public void onCompletion(String responseText) {
}
}) ;
}
}
public void supprimerBaseDeDonnees(String motcle)
{
if(!motcle.equals(""))
{
String postData = "" ;
postData += "&action=DELETE" ;
HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant()+"/"+motcle,postData, new ResponseTextHandler() {
public void onCompletion(String responseText) {
}
}) ;
}
}
public void modifierBaseDeDonnees(String motcle) {
if(!motcle.equals(""))
{
String postData = "" ;
postData += "&action=modification"+motcle ;
HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant() ,postData, new ResponseTextHandler() {
public void onCompletion(String responseText) {
Window.alert(responseText) ;
}
}) ;
}
}
public void deplacerBaseDeDonnees(String motcle) {
if(!motcle.equals(""))
{
String postData = "" ;
postData += "&action=deplacement"+motcle ;
HTTPRequest.asyncPost("jrest/InventoryKeyWordList/"+iMediateur.getIdentifiant() ,postData, new ResponseTextHandler() {
public void onCompletion(String responseText) {
Window.alert(responseText) ;
}
}) ;
}
}
}