| Line 76... |
Line 76... |
| 76 |
}
|
76 |
}
|
| 77 |
}
|
77 |
}
|
| 78 |
});
|
78 |
});
|
| 79 |
}
|
79 |
}
|
| Line 80... |
Line 80... |
| 80 |
|
80 |
|
| 81 |
public void ajouter(Collection collection) {
|
81 |
public void ajouter(Collection collection) {
|
| 82 |
String postDonneesEncodees = construirePost(null, collection);
|
- |
|
| 83 |
|
82 |
String postDonneesEncodees = construirePost(null, collection);
|
| 84 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|
83 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|
| 85 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
84 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
| 86 |
@Override
|
85 |
@Override
|
| 87 |
public void surReponse(JSONValue responseValue) {
|
86 |
public void surReponse(JSONValue responseValue) {
|
| Line 100... |
Line 99... |
| 100 |
}
|
99 |
}
|
| 101 |
});
|
100 |
});
|
| 102 |
}
|
101 |
}
|
| Line 103... |
Line 102... |
| 103 |
|
102 |
|
| 104 |
public void modifier(Collection collection) {
|
103 |
public void modifier(Collection collection) {
|
| 105 |
String postDonneesEncodees = construirePost(collection.getId(), collection);
|
- |
|
| 106 |
GWT.log(postDonneesEncodees, null);
|
- |
|
| 107 |
|
104 |
String postDonneesEncodees = construirePost(collection.getId(), collection);
|
| 108 |
String[] parametres = {collection.getId()};
|
105 |
String[] parametres = {collection.getId()};
|
| 109 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
|
106 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
|
| 110 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
107 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
| 111 |
@Override
|
108 |
@Override
|
| Line 137... |
Line 134... |
| 137 |
}
|
134 |
}
|
| 138 |
}
|
135 |
}
|
| 139 |
});
|
136 |
});
|
| 140 |
}
|
137 |
}
|
| Line 141... |
Line 138... |
| 141 |
|
138 |
|
| 142 |
private String construirePost(String collectionId, Collection collection) {
|
- |
|
| 143 |
|
- |
|
| 144 |
Debug.log("BEGIN CollectionAsynDao.construirePost()");
|
- |
|
| 145 |
|
- |
|
| 146 |
Debug.log("Collection = "+collection.toString());
|
- |
|
| 147 |
|
139 |
private String construirePost(String collectionId, Collection collection) {
|
| Line 148... |
Line 140... |
| 148 |
String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId);
|
140 |
String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId);
|
| 149 |
|
141 |
|
| 150 |
if (collection != null) {
|
142 |
if (collection != null) {
|
| 151 |
if (collectionId != null) {
|
143 |
if (collectionId != null) {
|
| 152 |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId);
|
- |
|
| 153 |
}
|
- |
|
| 154 |
|
- |
|
| Line 155... |
Line 144... |
| 155 |
Debug.log("CollectionAsynDao.construirePost(), id projet:"+collection.getIdProjet());
|
144 |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId);
|
| 156 |
Debug.log("CollectionAsynDao.construirePost(), liste projet:"+((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).toString());
|
145 |
}
|
| 157 |
|
146 |
|
| 158 |
/*
|
147 |
/*
|
| Line 178... |
Line 167... |
| 178 |
"&cc_ce_specimen_type=" + URL.encodeComponent(collection.getSpecimenType()) +
|
167 |
"&cc_ce_specimen_type=" + URL.encodeComponent(collection.getSpecimenType()) +
|
| 179 |
"&cc_specimen_type_nbre=" + URL.encodeComponent(collection.getSpecimenTypeNbre()) +
|
168 |
"&cc_specimen_type_nbre=" + URL.encodeComponent(collection.getSpecimenTypeNbre()) +
|
| 180 |
"&cc_ce_specimen_type_nbre_precision=" + URL.encodeComponent(collection.getSpecimenTypeNbrePrecision()) +
|
169 |
"&cc_ce_specimen_type_nbre_precision=" + URL.encodeComponent(collection.getSpecimenTypeNbrePrecision()) +
|
| 181 |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement());*/
|
170 |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement());*/
|
| 182 |
postDonnees += "&" + collection.obtenirChainePOST();
|
171 |
postDonnees += "&" + collection.obtenirChainePOST();
|
| 183 |
|
- |
|
| 184 |
Debug.log("1) postDonnees = "+postDonnees);
|
- |
|
| 185 |
}
|
172 |
}
|
| Line 186... |
Line 173... |
| 186 |
|
173 |
|
| 187 |
if (collection.getBotanique() != null) {
|
174 |
if (collection.getBotanique() != null) {
|
| 188 |
if (collectionId != null) {
|
175 |
if (collectionId != null) {
|
| Line 230... |
Line 217... |
| 230 |
"&ccb_ce_truk_inventaire_digital=" + URL.encodeComponent(collectionBotanique.getInventaireDigital()) +
|
217 |
"&ccb_ce_truk_inventaire_digital=" + URL.encodeComponent(collectionBotanique.getInventaireDigital()) +
|
| 231 |
"&ccb_inventaire_digital_pourcent=" + URL.encodeComponent(collectionBotanique.getInventaireDigitalPourcent()) +
|
218 |
"&ccb_inventaire_digital_pourcent=" + URL.encodeComponent(collectionBotanique.getInventaireDigitalPourcent()) +
|
| 232 |
"&ccb_ce_inventaire_etat=" + URL.encodeComponent(collectionBotanique.getInventaireEtat()) +
|
219 |
"&ccb_ce_inventaire_etat=" + URL.encodeComponent(collectionBotanique.getInventaireEtat()) +
|
| 233 |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes());*/
|
220 |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes());*/
|
| 234 |
postDonnees += "&" + collectionBotanique.obtenirChainePOST();
|
221 |
postDonnees += "&" + collectionBotanique.obtenirChainePOST();
|
| 235 |
|
- |
|
| 236 |
Debug.log("2) postDonnees = "+postDonnees);
|
- |
|
| 237 |
|
- |
|
| 238 |
}
|
222 |
}
|
| Line 239... |
Line -... |
| 239 |
|
- |
|
| 240 |
Debug.log("END CollectionAsynDao.construirePost()");
|
- |
|
| 241 |
|
223 |
|
| 242 |
return postDonnees;
|
224 |
return postDonnees;
|
| 243 |
}
|
225 |
}
|
| 244 |
}
|
226 |
}
|