78,9 → 78,8 |
}); |
} |
|
public void ajouter(Collection collection) { |
public void ajouter(Collection collection) { |
String postDonneesEncodees = construirePost(null, collection); |
|
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM); |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() { |
@Override |
102,9 → 101,7 |
} |
|
public void modifier(Collection collection) { |
String postDonneesEncodees = construirePost(collection.getId(), collection); |
GWT.log(postDonneesEncodees, null); |
|
String postDonneesEncodees = construirePost(collection.getId(), collection); |
String[] parametres = {collection.getId()}; |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres); |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() { |
139,12 → 136,7 |
}); |
} |
|
private String construirePost(String collectionId, Collection collection) { |
|
Debug.log("BEGIN CollectionAsynDao.construirePost()"); |
|
Debug.log("Collection = "+collection.toString()); |
|
private String construirePost(String collectionId, Collection collection) { |
String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId); |
|
if (collection != null) { |
151,9 → 143,6 |
if (collectionId != null) { |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId); |
} |
|
Debug.log("CollectionAsynDao.construirePost(), id projet:"+collection.getIdProjet()); |
Debug.log("CollectionAsynDao.construirePost(), liste projet:"+((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).toString()); |
|
/* |
postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).getAbreviation()); |
180,8 → 169,6 |
"&cc_ce_specimen_type_nbre_precision=" + URL.encodeComponent(collection.getSpecimenTypeNbrePrecision()) + |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement());*/ |
postDonnees += "&" + collection.obtenirChainePOST(); |
|
Debug.log("1) postDonnees = "+postDonnees); |
} |
|
if (collection.getBotanique() != null) { |
232,13 → 219,8 |
"&ccb_ce_inventaire_etat=" + URL.encodeComponent(collectionBotanique.getInventaireEtat()) + |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes());*/ |
postDonnees += "&" + collectionBotanique.obtenirChainePOST(); |
|
Debug.log("2) postDonnees = "+postDonnees); |
|
} |
|
Debug.log("END CollectionAsynDao.construirePost()"); |
|
return postDonnees; |
} |
} |