Subversion Repositories eFlore/Applications.coel

Rev

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

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