Subversion Repositories eFlore/Applications.coel

Rev

Rev 1319 | Rev 1367 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1319 Rev 1329
1
package org.tela_botanica.client.modeles.structure;
1
package org.tela_botanica.client.modeles.structure;
2
 
2
 
3
import java.util.HashMap;
3
import java.util.HashMap;
4
 
4
 
5
import org.tela_botanica.client.Mediateur;
5
import org.tela_botanica.client.Mediateur;
6
import org.tela_botanica.client.RegistreId;
6
import org.tela_botanica.client.RegistreId;
7
import org.tela_botanica.client.http.JsonRestRequestBuilder;
7
import org.tela_botanica.client.http.JsonRestRequestBuilder;
8
import org.tela_botanica.client.http.JsonRestRequestCallback;
8
import org.tela_botanica.client.http.JsonRestRequestCallback;
9
import org.tela_botanica.client.interfaces.Rafraichissable;
9
import org.tela_botanica.client.interfaces.Rafraichissable;
10
import org.tela_botanica.client.modeles.Information;
10
import org.tela_botanica.client.modeles.Information;
11
import org.tela_botanica.client.modeles.personne.PersonneListe;
11
import org.tela_botanica.client.modeles.personne.PersonneListe;
12
import org.tela_botanica.client.modeles.projet.ProjetListe;
12
import org.tela_botanica.client.modeles.projet.ProjetListe;
13
import org.tela_botanica.client.synchronisation.Reponse;
13
import org.tela_botanica.client.synchronisation.Reponse;
14
import org.tela_botanica.client.util.UtilDAO;
14
import org.tela_botanica.client.util.UtilDAO;
15
 
15
 
16
import com.extjs.gxt.ui.client.Registry;
16
import com.extjs.gxt.ui.client.Registry;
17
import com.google.gwt.core.client.GWT;
17
import com.google.gwt.core.client.GWT;
18
import com.google.gwt.http.client.URL;
18
import com.google.gwt.http.client.URL;
19
import com.google.gwt.json.client.JSONArray;
19
import com.google.gwt.json.client.JSONArray;
20
import com.google.gwt.json.client.JSONObject;
20
import com.google.gwt.json.client.JSONObject;
21
import com.google.gwt.json.client.JSONValue;
21
import com.google.gwt.json.client.JSONValue;
22
 
22
 
23
public class StructureAsyncDao {
23
public class StructureAsyncDao {
24
	private static final String SERVICE_NOM = "CoelStructure";
24
	private static final String SERVICE_NOM = "CoelStructure";
25
	
25
	
26
	private String utilisateurId = null;
26
	private String utilisateurId = null;
27
	private Rafraichissable vueARafraichir = null;
27
	private Rafraichissable vueARafraichir = null;
28
	
28
	
29
	public StructureAsyncDao(Rafraichissable vue) {
29
	public StructureAsyncDao(Rafraichissable vue) {
30
		vueARafraichir = vue;
30
		vueARafraichir = vue;
31
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
31
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
32
		GWT.log("ID utilisateur :"+utilisateurId, null);
-
 
33
	}
32
	}
34
	
33
 
-
 
34
	/**
-
 
35
	 * 
-
 
36
	 * @param paginationProgressive : définit le mode de consultation de la base de données
-
 
37
	 * 			- True :	la consultation des données est progressive, ce qui signifie que la liste est chargée (paginée) au
-
 
38
	 * 						fur et à mesure de la consultation des données par l'utilisateur.
-
 
39
	 * 			- False :	la consultation des données est classique : un seul appel à la base de données est effectué, le retour
-
 
40
	 * 						est renvoyé à l'appelant
-
 
41
	 * 			// FIXME : si la taille de la liste est supérieure à la limite du JREST (150), ce deuxieme mode ne fonctionne pas
-
 
42
	 */
35
	public void selectionner(final String projetId, final String structureId, final String nomStructure, final int pageCourante, final int nbElements, final Integer seqId) {
43
	public void selectionner(final boolean paginationProgressive, final String projetId, final String structureId, final String nomStructure, final int start, final int nbElements, final Integer seqId) {
-
 
44
		
-
 
45
		String nom = (nomStructure == null) ? "%" : nomStructure+"%";
36
		String[] parametres = {projetId, structureId, nomStructure};
46
		String[] parametres = {projetId, structureId, nom};
37
		
47
		
38
		HashMap<String, String> restrictions = new HashMap<String, String>();
-
 
39
		restrictions.put("start", String.valueOf(pageCourante*nbElements));
48
		HashMap<String, String> restrictions = new HashMap<String, String>();
40
		restrictions.put("orderby", "cs_ville");
49
		restrictions.put("orderby", "cs_ville");
41
		if (nbElements != -1)	{
50
		if (nbElements != -1)	{
42
			restrictions.put("limit", String.valueOf(nbElements));
51
			restrictions.put("limit", String.valueOf(nbElements));
43
		}
52
		}
44
		
53
		
45
		final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres, restrictions);
-
 
46
		rb.envoyerRequete(null, new JsonRestRequestCallback() {
-
 
47
			@Override
-
 
48
			public void surReponse(JSONValue responseValue) {
54
		/** GESTION DE LA REQUETE dans le cas d'une liste paginée progressive **/
49
				if (responseValue != null) {
-
 
50
					Information info = new Information("selection_structure");
-
 
51
					// Si la requête est un succès, reception d'un objet ou d'un tableau
-
 
-
 
55
		if (paginationProgressive) {
52
					JSONArray responseArray = responseValue.isArray();
56
			
53
					if (responseArray.get(1).isObject() != null) {
-
 
54
						final JSONObject reponse = responseArray.get(1).isObject();
57
			/** DEFINITION DU TUPLE DE DEPART **/
55
						Structure structure = new Structure(reponse);
-
 
56
						StructureConservation structureConservation = new StructureConservation(reponse);
-
 
-
 
58
			restrictions.put("start", String.valueOf(start));
57
						StructureValorisation structureValorisation = new StructureValorisation(reponse);
59
			
58
						info.setDonnee(0, structure);
60
			/** CONSTRUCTION DE LA REQUETE **/
59
						info.setDonnee(1, structureConservation);
-
 
-
 
61
    		final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres, restrictions);
-
 
62
 
-
 
63
    		/** ENVOI DE LA REQUETE **/
-
 
64
    		rb.envoyerRequete(null, new JsonRestRequestCallback()
-
 
65
    		{
-
 
66
    			/** RECEPTION DE LA REPONSE **/
60
						info.setDonnee(2, structureValorisation);
67
    			public void surReponse(JSONValue responseValue)
61
 
68
    			{
62
						if (seqId != null)	{
69
					if (seqId != null)	{
63
							Reponse reponseRequete = new Reponse(info, seqId);
70
						Reponse reponseRequete = new Reponse(responseValue, seqId);
64
							vueARafraichir.rafraichir(reponseRequete);
-
 
65
						}
-
 
66
						else
71
						vueARafraichir.rafraichir(reponseRequete);
67
						vueARafraichir.rafraichir(info);
72
					}
68
						
73
					
69
					} else if (responseArray.get(1).isArray() != null) {
74
    				/** Dans le cas d'une liste paginée, vueARafraichir est un objet Proxy.
70
						final JSONArray reponse = responseValue.isArray();
75
    				 * On retourne l'objet JSON au proxy afin que ce soit lui qui le traite **/
71
						StructureListe structures; // = new StructureListe(reponse);
-
 
72
						if (reponse.get(1).isObject() != null)	{
76
					else vueARafraichir.rafraichir(responseValue);
-
 
77
    			}
73
							structures = new StructureListe(reponse.get(1).isArray());
78
    		});
74
						} else	{
79
		}
-
 
80
		/** GESTION DE LA REQUETE dans le cas d'une liste NON paginée progressive **/
75
							structures = new StructureListe(reponse.get(1).isArray(), reponse.get(0).isNumber(), vueARafraichir);
81
		else {
76
						}
82
			
-
 
83
			/** DEFINITION DU TUPLE DE DEPART **/
-
 
84
			restrictions.put("start", String.valueOf(start*nbElements));
-
 
85
			
77
						structures.setTaillePage(nbElements);
86
			final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres, restrictions);
-
 
87
			
-
 
88
			rb.envoyerRequete(null, new JsonRestRequestCallback() {
-
 
89
 
-
 
90
				public void surReponse(JSONValue responseValue) {
-
 
91
					
-
 
92
					if (responseValue != null) {
-
 
93
						
-
 
94
						Information info = new Information("selection_structure");
-
 
95
						
-
 
96
						JSONObject responseObject = responseValue.isObject();
-
 
97
						
-
 
98
						if (responseObject != null) {
-
 
99
							
-
 
100
							// Si la réponse est un tableau, alors c'est une liste de structure qui a été retournée
-
 
101
							if (responseObject.get("structures").isArray() != null) {
-
 
102
								
-
 
103
								JSONObject reponse = responseObject;
-
 
104
								StructureListe structures;
-
 
105
								structures = new StructureListe(reponse.get("structures").isArray(), reponse.get("nbElements").isNumber(), vueARafraichir);
-
 
106
								structures.setTaillePage(nbElements);
-
 
107
								structures.setPageCourante(start);
-
 
108
								
-
 
109
								info.setDonnee(0, structures);
-
 
110
								
-
 
111
								if (seqId != null)	{
-
 
112
									Reponse reponseRequete = new Reponse(info, seqId);
-
 
113
									vueARafraichir.rafraichir(reponseRequete);
-
 
114
								}
-
 
115
								else vueARafraichir.rafraichir(structures);
-
 
116
								
-
 
117
							// Si la réponse est un objet, alors c'est une unique structure qui a été retournée
-
 
118
							} else if (responseObject.get("structures").isObject() != null) {
-
 
119
								
-
 
120
								JSONObject reponse = responseObject.get("structures").isObject();
-
 
121
								Structure structure = new Structure(reponse);
-
 
122
								StructureConservation structureConservation = new StructureConservation(reponse);
-
 
123
								StructureValorisation structureValorisation = new StructureValorisation(reponse);
-
 
124
								
-
 
125
								info.setDonnee(0, structure);
78
						structures.setPageCourante(pageCourante);							
126
								info.setDonnee(1, structureConservation);
79
						info.setDonnee(0, structures);
127
								info.setDonnee(2, structureValorisation);
80
 
128
								
-
 
129
								if (seqId != null)	{
-
 
130
									Reponse reponseRequete = new Reponse(info, seqId);
-
 
131
									vueARafraichir.rafraichir(reponseRequete);
-
 
132
								}
-
 
133
								else vueARafraichir.rafraichir(info);
81
						if (seqId != null)	{
134
							}  
82
							Reponse reponseRequete = new Reponse(info, seqId);
-
 
83
							vueARafraichir.rafraichir(reponseRequete);
-
 
84
						}
135
						} else {
85
						else
-
 
86
						vueARafraichir.rafraichir(structures);
-
 
87
					} else {
-
 
88
						GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un objet ou un talbeau JSON et vaut : "+responseValue.toString(), null);
136
							GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un objet ou un talbeau JSON et vaut : "+responseValue.toString(), null);
89
					}
137
						}
90
				} else {
138
					} else {
91
					if (structureId == null) {
139
						if (structureId == null) {
-
 
140
							// Dans le cas, où nous demandons toutes les institutions et qu'il n'y en a pas, nous retournons un objet vide
92
						// Dans le cas, où nous demandons toutes les institutions et qu'il n'y en a pas, nous retournons un objet vide
141
							StructureListe structures = new StructureListe(0);
93
						StructureListe structures = new StructureListe(0);
142
							vueARafraichir.rafraichir(structures);								
94
						vueARafraichir.rafraichir(structures);								
143
						}
95
					}
144
					}
96
				}
145
				}
-
 
146
			});
97
			}
147
		}
98
		});
148
	}
99
	}
149
	
100
	
150
 
101
	public void ajouter(final Structure str, StructureConservation conservation, StructureValorisation valorisation) {
151
	public void ajouter(final Structure str, StructureConservation conservation, StructureValorisation valorisation) {
102
		String postDonneesEncodees = construirePost(null, str, conservation, valorisation);
152
		String postDonneesEncodees = construirePost(null, str, conservation, valorisation);
103
 
153
 
104
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
154
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
105
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
155
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
106
			@Override
156
			@Override
107
			public void surReponse(JSONValue responseValue) {
157
			public void surReponse(JSONValue responseValue) {
108
				if (responseValue.isString() != null) {
158
				if (responseValue.isString() != null) {
109
					Information info = new Information("ajout_structure");
159
					Information info = new Information("ajout_structure");
110
					String structureIdOuMessage = responseValue.isString().stringValue();
160
					String structureIdOuMessage = responseValue.isString().stringValue();
111
					if (structureIdOuMessage.matches("^[0-9]+$")) {
161
					if (structureIdOuMessage.matches("^[0-9]+$")) {
112
						info.setDonnee(structureIdOuMessage);
162
						info.setDonnee(structureIdOuMessage);
113
					} else {
163
					} else {
114
						info.setMessage(structureIdOuMessage);
164
						info.setMessage(structureIdOuMessage);
115
					}
165
					}
116
					vueARafraichir.rafraichir(info);
166
					vueARafraichir.rafraichir(info);
117
				} else {
167
				} else {
118
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
168
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
119
				}
169
				}
120
			}
170
			}
121
		});
171
		});
122
	}
172
	}
123
 
173
 
124
	public void modifier(String structureId, Structure str, StructureConservation conservation, StructureValorisation valorisation) {
174
	public void modifier(String structureId, Structure str, StructureConservation conservation, StructureValorisation valorisation) {
125
		String postDonneesEncodees = construirePost(structureId, str, conservation, valorisation);
175
		String postDonneesEncodees = construirePost(structureId, str, conservation, valorisation);
126
		String[] parametres = {structureId};
176
		String[] parametres = {structureId};
127
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
177
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
128
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
178
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
129
			@Override
179
			@Override
130
			public void surReponse(JSONValue responseValue) {
180
			public void surReponse(JSONValue responseValue) {
131
				// Si la requête est un succès, reception d'une chaine
181
				// Si la requête est un succès, reception d'une chaine
132
				if (responseValue.isString() != null) {
182
				if (responseValue.isString() != null) {
133
					Information info = new Information("modif_structure");
183
					Information info = new Information("modif_structure");
134
					info.setMessage(responseValue.isString().stringValue());
184
					info.setMessage(responseValue.isString().stringValue());
135
					vueARafraichir.rafraichir(info);
185
					vueARafraichir.rafraichir(info);
136
				} else {
186
				} else {
137
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
187
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
138
				}
188
				}
139
			}
189
			}
140
		});
190
		});
141
	}
191
	}
142
	
192
	
143
	public void supprimer(String structuresId) {
193
	public void supprimer(String structuresId) {
144
		String[] parametres = {utilisateurId, structuresId};
194
		String[] parametres = {utilisateurId, structuresId};
145
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
195
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
146
		rb.envoyerRequeteSuppression(new JsonRestRequestCallback() {
196
		rb.envoyerRequeteSuppression(new JsonRestRequestCallback() {
147
			@Override
197
			@Override
148
			public void surReponse(JSONValue responseValue) {
198
			public void surReponse(JSONValue responseValue) {
149
				if (responseValue.isString() != null) {
199
				if (responseValue.isString() != null) {
150
					Information info = new Information("suppression_structure");
200
					Information info = new Information("suppression_structure");
151
					info.setMessage(responseValue.isString().stringValue());
201
					info.setMessage(responseValue.isString().stringValue());
152
					vueARafraichir.rafraichir(info);
202
					vueARafraichir.rafraichir(info);
153
				} else {
203
				} else {
154
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
204
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
155
				}
205
				}
156
			}
206
			}
157
		});
207
		});
158
	}
208
	}
159
	
209
	
160
	private String construirePost(String structureId, Structure str, StructureConservation conservation, StructureValorisation valorisation) {
210
	private String construirePost(String structureId, Structure str, StructureConservation conservation, StructureValorisation valorisation) {
161
		String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId); 
211
		String postDonnees = "cmhl_ce_modifier_par=" + URL.encodeComponent(utilisateurId); 
162
			
212
			
163
		if (str != null) {
213
		if (str != null) {
164
			if (structureId != null) {
214
			if (structureId != null) {
165
				postDonnees += "&cs_id_structure=" + URL.encodeComponent(structureId);
215
				postDonnees += "&cs_id_structure=" + URL.encodeComponent(structureId);
166
			}
216
			}
167
			postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(str.getIdProjet()).getAbreviation());
217
			postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(str.getIdProjet()).getAbreviation());
168
			postDonnees += "&cs_ce_projet=" + URL.encodeComponent(str.getIdProjet()) +
218
			postDonnees += "&cs_ce_projet=" + URL.encodeComponent(str.getIdProjet()) +
169
				"&cs_ce_mere=" + URL.encodeComponent(str.getIdMere()) +
219
				"&cs_ce_mere=" + URL.encodeComponent(str.getIdMere()) +
170
				"&cs_guid=" + URL.encodeComponent(str.getGuid()) +
220
				"&cs_guid=" + URL.encodeComponent(str.getGuid()) +
171
				"&cs_truk_identifiant_alternatif=" + URL.encodeComponent(str.getIdAlternatif()) +
221
				"&cs_truk_identifiant_alternatif=" + URL.encodeComponent(str.getIdAlternatif()) +
172
				"&cs_nom=" + URL.encodeComponent(str.getNom()) +
222
				"&cs_nom=" + URL.encodeComponent(str.getNom()) +
173
				"&cs_truk_nom_alternatif=" + URL.encodeComponent(str.getNomAlternatif()) +
223
				"&cs_truk_nom_alternatif=" + URL.encodeComponent(str.getNomAlternatif()) +
174
				"&cs_description=" + URL.encodeComponent(str.getDescription()) +
224
				"&cs_description=" + URL.encodeComponent(str.getDescription()) +
175
				"&cs_ce_type=" + URL.encodeComponent(str.getType()) +
225
				"&cs_ce_type=" + URL.encodeComponent(str.getType()) +
176
				"&cs_ce_truk_type_prive=" + URL.encodeComponent(str.getTypePrive()) +
226
				"&cs_ce_truk_type_prive=" + URL.encodeComponent(str.getTypePrive()) +
177
				"&cs_ce_truk_type_public=" + URL.encodeComponent(str.getTypePublic()) +
227
				"&cs_ce_truk_type_public=" + URL.encodeComponent(str.getTypePublic()) +
178
				"&cs_adresse_01=" + URL.encodeComponent(str.getAdresse()) +
228
				"&cs_adresse_01=" + URL.encodeComponent(str.getAdresse()) +
179
				"&cs_adresse_02=" + URL.encodeComponent(str.getAdresseComplement()) +
229
				"&cs_adresse_02=" + URL.encodeComponent(str.getAdresseComplement()) +
180
				"&cs_date_fondation=" + URL.encodeComponent(str.getDateFondationFormatMysql()) +
230
				"&cs_date_fondation=" + URL.encodeComponent(str.getDateFondationFormatMysql()) +
181
				"&cs_code_postal=" + URL.encodeComponent(str.getCodePostal()) +
231
				"&cs_code_postal=" + URL.encodeComponent(str.getCodePostal()) +
182
				"&cs_ville=" + URL.encodeComponent(str.getVille()) +
232
				"&cs_ville=" + URL.encodeComponent(str.getVille()) +
183
				"&cs_ce_truk_region=" + URL.encodeComponent(str.get("ce_truk_region").toString()) +
233
				"&cs_ce_truk_region=" + URL.encodeComponent(str.get("ce_truk_region").toString()) +
184
				"&cs_ce_truk_pays=" + URL.encodeComponent(str.getPays()) +
234
				"&cs_ce_truk_pays=" + URL.encodeComponent(str.getPays()) +
185
				"&cs_latitude=" + URL.encodeComponent(str.getLatitude()) +
235
				"&cs_latitude=" + URL.encodeComponent(str.getLatitude()) +
186
				"&cs_longitude=" + URL.encodeComponent(str.getLongitude()) +
236
				"&cs_longitude=" + URL.encodeComponent(str.getLongitude()) +
187
				"&cs_truk_telephone=" + URL.encodeComponent(str.getTelephone()) +
237
				"&cs_truk_telephone=" + URL.encodeComponent(str.getTelephone()) +
188
				"&cs_truk_url=" + URL.encodeComponent(str.getUrl()) +
238
				"&cs_truk_url=" + URL.encodeComponent(str.getUrl()) +
189
				"&cs_nbre_personne=" + URL.encodeComponent(Integer.toString(str.getNbrePersonne())) +
239
				"&cs_nbre_personne=" + URL.encodeComponent(Integer.toString(str.getNbrePersonne())) +
190
				"&cs_condition_acces=" + URL.encodeComponent(str.getConditionAcces())+
240
				"&cs_condition_acces=" + URL.encodeComponent(str.getConditionAcces())+
191
				"&cs_condition_usage=" + URL.encodeComponent(str.getConditionUsage())+
241
				"&cs_condition_usage=" + URL.encodeComponent(str.getConditionUsage())+
192
				"&cs_courriel=" + URL.encodeComponent(str.getCourriel());
242
				"&cs_courriel=" + URL.encodeComponent(str.getCourriel());
193
		}
243
		}
194
		if (conservation != null) {
244
		if (conservation != null) {
195
			if (structureId != null) {
245
			if (structureId != null) {
196
				postDonnees += "&csc_id_structure=" + URL.encodeComponent(structureId);
246
				postDonnees += "&csc_id_structure=" + URL.encodeComponent(structureId);
197
			}
247
			}
198
			postDonnees += "&csc_mark_formation=" + URL.encodeComponent(conservation.getFormation()) +
248
			postDonnees += "&csc_mark_formation=" + URL.encodeComponent(conservation.getFormation()) +
199
				"&csc_formation=" + URL.encodeComponent(conservation.getFormationInfo()) +
249
				"&csc_formation=" + URL.encodeComponent(conservation.getFormationInfo()) +
200
				"&csc_mark_formation_interet=" + URL.encodeComponent(conservation.getFormationInteret()) +
250
				"&csc_mark_formation_interet=" + URL.encodeComponent(conservation.getFormationInteret()) +
201
				"&csc_truk_stockage_local=" + URL.encodeComponent(conservation.getStockageLocal()) +
251
				"&csc_truk_stockage_local=" + URL.encodeComponent(conservation.getStockageLocal()) +
202
				"&csc_truk_stockage_meuble=" + URL.encodeComponent(conservation.getStockageMeuble()) +
252
				"&csc_truk_stockage_meuble=" + URL.encodeComponent(conservation.getStockageMeuble()) +
203
				"&csc_truk_stockage_parametre=" + URL.encodeComponent(conservation.getStockageParametre()) +
253
				"&csc_truk_stockage_parametre=" + URL.encodeComponent(conservation.getStockageParametre()) +
204
				"&csc_mark_collection_commune=" + URL.encodeComponent(conservation.getCollectionCommune()) +
254
				"&csc_mark_collection_commune=" + URL.encodeComponent(conservation.getCollectionCommune()) +
205
				"&csc_truk_collection_autre=" + URL.encodeComponent(conservation.getCollectionAutre()) +
255
				"&csc_truk_collection_autre=" + URL.encodeComponent(conservation.getCollectionAutre()) +
206
				"&csc_mark_acces_controle=" + URL.encodeComponent(conservation.getAccesControle()) +
256
				"&csc_mark_acces_controle=" + URL.encodeComponent(conservation.getAccesControle()) +
207
				"&csc_mark_restauration=" + URL.encodeComponent(conservation.getRestauration()) +
257
				"&csc_mark_restauration=" + URL.encodeComponent(conservation.getRestauration()) +
208
				"&csc_truk_restauration_operation=" + URL.encodeComponent(conservation.getRestaurationOperation()) +
258
				"&csc_truk_restauration_operation=" + URL.encodeComponent(conservation.getRestaurationOperation()) +
209
				"&csc_ce_materiel_conservation=" + URL.encodeComponent(conservation.getMaterielConservation()) +
259
				"&csc_ce_materiel_conservation=" + URL.encodeComponent(conservation.getMaterielConservation()) +
210
				"&csc_truk_materiel_autre=" + URL.encodeComponent(conservation.getMaterielAutre()) +
260
				"&csc_truk_materiel_autre=" + URL.encodeComponent(conservation.getMaterielAutre()) +
211
				"&csc_mark_traitement=" + URL.encodeComponent(conservation.getTraitement()) +
261
				"&csc_mark_traitement=" + URL.encodeComponent(conservation.getTraitement()) +
212
				"&csc_truk_traitement=" + URL.encodeComponent(conservation.getTraitements()) +
262
				"&csc_truk_traitement=" + URL.encodeComponent(conservation.getTraitements()) +
213
				"&csc_mark_acquisition_collection=" + URL.encodeComponent(conservation.getAcquisitionCollection()) +
263
				"&csc_mark_acquisition_collection=" + URL.encodeComponent(conservation.getAcquisitionCollection()) +
214
				"&csc_mark_acquisition_echantillon=" + URL.encodeComponent(conservation.getAcquisitionEchantillon()) +
264
				"&csc_mark_acquisition_echantillon=" + URL.encodeComponent(conservation.getAcquisitionEchantillon()) +
215
				"&csc_mark_acquisition_traitement=" + URL.encodeComponent(conservation.getAcquisitionTraitement()) +
265
				"&csc_mark_acquisition_traitement=" + URL.encodeComponent(conservation.getAcquisitionTraitement()) +
216
				"&csc_truk_acquisition_traitement_poison=" + URL.encodeComponent(conservation.getAcquisitionTraitementPoison()) +
266
				"&csc_truk_acquisition_traitement_poison=" + URL.encodeComponent(conservation.getAcquisitionTraitementPoison()) +
217
				"&csc_truk_acquisition_traitement_insecte=" + URL.encodeComponent(conservation.getAcquisitionTraitementInsecte());
267
				"&csc_truk_acquisition_traitement_insecte=" + URL.encodeComponent(conservation.getAcquisitionTraitementInsecte());
218
		}
268
		}
219
		if (valorisation != null) {
269
		if (valorisation != null) {
220
			if (structureId != null) {
270
			if (structureId != null) {
221
				postDonnees += "&csv_id_structure=" + URL.encodeComponent(structureId);
271
				postDonnees += "&csv_id_structure=" + URL.encodeComponent(structureId);
222
			}
272
			}
223
			postDonnees += "&csv_mark_action=" + URL.encodeComponent(valorisation.getAction()) +
273
			postDonnees += "&csv_mark_action=" + URL.encodeComponent(valorisation.getAction()) +
224
				"&csv_truk_action=" + URL.encodeComponent(valorisation.getActionInfo()) +
274
				"&csv_truk_action=" + URL.encodeComponent(valorisation.getActionInfo()) +
225
				"&csv_publication=" + URL.encodeComponent(valorisation.getPublication()) +
275
				"&csv_publication=" + URL.encodeComponent(valorisation.getPublication()) +
226
				"&csv_collection_autre=" + URL.encodeComponent(valorisation.getCollectionAutre()) +
276
				"&csv_collection_autre=" + URL.encodeComponent(valorisation.getCollectionAutre()) +
227
				"&csv_mark_action_future=" + URL.encodeComponent(valorisation.getActionFuture()) +
277
				"&csv_mark_action_future=" + URL.encodeComponent(valorisation.getActionFuture()) +
228
				"&csv_action_future=" + URL.encodeComponent(valorisation.getActionFutureInfo()) +
278
				"&csv_action_future=" + URL.encodeComponent(valorisation.getActionFutureInfo()) +
229
				"&csv_mark_recherche=" + URL.encodeComponent(valorisation.getRecherche()) +
279
				"&csv_mark_recherche=" + URL.encodeComponent(valorisation.getRecherche()) +
230
				"&csv_truk_recherche_provenance=" + URL.encodeComponent(valorisation.getRechercheProvenance()) +
280
				"&csv_truk_recherche_provenance=" + URL.encodeComponent(valorisation.getRechercheProvenance()) +
231
				"&csv_truk_recherche_type=" + URL.encodeComponent(valorisation.getRechercheType()) +
281
				"&csv_truk_recherche_type=" + URL.encodeComponent(valorisation.getRechercheType()) +
232
				"&csv_mark_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotif()) +
282
				"&csv_mark_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotif()) +
233
				"&csv_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotifInfo()) +
283
				"&csv_acces_ss_motif=" + URL.encodeComponent(valorisation.getAccesSansMotifInfo()) +
234
				"&csv_mark_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotif()) +
284
				"&csv_mark_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotif()) +
235
				"&csv_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotifInfo());
285
				"&csv_visite_avec_motif=" + URL.encodeComponent(valorisation.getVisiteAvecMotifInfo());
236
		}
286
		}
237
		return postDonnees;
287
		return postDonnees;
238
	}
288
	}
239
}
289
}