Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1014 Rev 1017
1
package org.tela_botanica.client;
1
package org.tela_botanica.client;
2
 
2
 
3
import java.util.Iterator;
3
import java.util.Iterator;
4
import java.util.List;
4
import java.util.List;
5
 
5
 
6
import org.tela_botanica.client.composants.AideFenetre;
6
import org.tela_botanica.client.composants.AideFenetre;
7
import org.tela_botanica.client.composants.IdentificationFenetre;
7
import org.tela_botanica.client.composants.IdentificationFenetre;
8
import org.tela_botanica.client.composants.LicenceFenetre;
8
import org.tela_botanica.client.composants.LicenceFenetre;
9
import org.tela_botanica.client.composants.ParametreFenetre;
9
import org.tela_botanica.client.composants.ParametreFenetre;
10
import org.tela_botanica.client.configuration.APropos;
10
import org.tela_botanica.client.configuration.APropos;
11
import org.tela_botanica.client.configuration.Configuration;
11
import org.tela_botanica.client.configuration.Configuration;
12
import org.tela_botanica.client.i18n.Constantes;
12
import org.tela_botanica.client.i18n.Constantes;
13
import org.tela_botanica.client.i18n.ErrorMessages;
13
import org.tela_botanica.client.i18n.ErrorMessages;
14
import org.tela_botanica.client.interfaces.Rafraichissable;
14
import org.tela_botanica.client.interfaces.Rafraichissable;
15
import org.tela_botanica.client.modeles.Information;
15
import org.tela_botanica.client.modeles.Information;
16
import org.tela_botanica.client.modeles.MenuApplicationId;
16
import org.tela_botanica.client.modeles.MenuApplicationId;
17
import org.tela_botanica.client.modeles.Utilisateur;
17
import org.tela_botanica.client.modeles.Utilisateur;
18
import org.tela_botanica.client.modeles.Valeur;
18
import org.tela_botanica.client.modeles.Valeur;
19
import org.tela_botanica.client.modeles.ValeurListe;
19
import org.tela_botanica.client.modeles.ValeurListe;
20
import org.tela_botanica.client.modeles.collection.Collection;
20
import org.tela_botanica.client.modeles.collection.Collection;
21
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
21
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
22
import org.tela_botanica.client.modeles.collection.CollectionACommentaireAsyncDao;
22
import org.tela_botanica.client.modeles.collection.CollectionACommentaireAsyncDao;
23
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
23
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
24
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
24
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
25
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
25
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
26
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
26
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
27
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
27
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
28
import org.tela_botanica.client.modeles.collection.CollectionListe;
28
import org.tela_botanica.client.modeles.collection.CollectionListe;
29
import org.tela_botanica.client.modeles.commentaire.Commentaire;
29
import org.tela_botanica.client.modeles.commentaire.Commentaire;
30
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
30
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
31
import org.tela_botanica.client.modeles.personne.Personne;
31
import org.tela_botanica.client.modeles.personne.Personne;
32
import org.tela_botanica.client.modeles.personne.PersonneListe;
32
import org.tela_botanica.client.modeles.personne.PersonneListe;
33
import org.tela_botanica.client.modeles.projet.Projet;
33
import org.tela_botanica.client.modeles.projet.Projet;
34
import org.tela_botanica.client.modeles.projet.ProjetListe;
34
import org.tela_botanica.client.modeles.projet.ProjetListe;
35
import org.tela_botanica.client.modeles.publication.Publication;
35
import org.tela_botanica.client.modeles.publication.Publication;
36
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
36
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
37
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
37
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
38
import org.tela_botanica.client.modeles.publication.PublicationListe;
38
import org.tela_botanica.client.modeles.publication.PublicationListe;
39
import org.tela_botanica.client.modeles.structure.Structure;
39
import org.tela_botanica.client.modeles.structure.Structure;
40
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
40
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
41
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
41
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
42
import org.tela_botanica.client.modeles.structure.StructureConservation;
42
import org.tela_botanica.client.modeles.structure.StructureConservation;
43
import org.tela_botanica.client.modeles.structure.StructureListe;
43
import org.tela_botanica.client.modeles.structure.StructureListe;
44
import org.tela_botanica.client.modeles.structure.StructureValorisation;
44
import org.tela_botanica.client.modeles.structure.StructureValorisation;
45
import org.tela_botanica.client.util.Debug;
45
import org.tela_botanica.client.util.Debug;
46
import org.tela_botanica.client.vues.ContenuVue;
46
import org.tela_botanica.client.vues.ContenuVue;
47
import org.tela_botanica.client.vues.EnteteVue;
47
import org.tela_botanica.client.vues.EnteteVue;
48
import org.tela_botanica.client.vues.Formulaire;
48
import org.tela_botanica.client.vues.Formulaire;
49
import org.tela_botanica.client.vues.NavigationVue;
49
import org.tela_botanica.client.vues.NavigationVue;
50
import org.tela_botanica.client.vues.PopupChargement;
50
import org.tela_botanica.client.vues.PopupChargement;
51
import org.tela_botanica.client.vues.StatutVue;
51
import org.tela_botanica.client.vues.StatutVue;
52
import org.tela_botanica.client.vues.MenuVue;
52
import org.tela_botanica.client.vues.MenuVue;
53
import org.tela_botanica.client.vues.accueil.AccueilVue;
53
import org.tela_botanica.client.vues.accueil.AccueilVue;
54
import org.tela_botanica.client.vues.collection.CollectionForm;
54
import org.tela_botanica.client.vues.collection.CollectionForm;
55
import org.tela_botanica.client.vues.collection.CollectionListeVue;
55
import org.tela_botanica.client.vues.collection.CollectionListeVue;
56
import org.tela_botanica.client.vues.collection.CollectionVue;
56
import org.tela_botanica.client.vues.collection.CollectionVue;
57
import org.tela_botanica.client.vues.commentaire.CommentaireForm;
57
import org.tela_botanica.client.vues.commentaire.CommentaireForm;
58
import org.tela_botanica.client.vues.commentaire.CommentaireVue;
58
import org.tela_botanica.client.vues.commentaire.CommentaireVue;
59
import org.tela_botanica.client.vues.personne.PersonneForm;
59
import org.tela_botanica.client.vues.personne.PersonneForm;
60
import org.tela_botanica.client.vues.personne.PersonneVue;
60
import org.tela_botanica.client.vues.personne.PersonneVue;
61
import org.tela_botanica.client.vues.projet.ProjetForm;
61
import org.tela_botanica.client.vues.projet.ProjetForm;
62
import org.tela_botanica.client.vues.projet.ProjetVue;
62
import org.tela_botanica.client.vues.projet.ProjetVue;
63
import org.tela_botanica.client.vues.publication.PublicationForm;
63
import org.tela_botanica.client.vues.publication.PublicationForm;
64
import org.tela_botanica.client.vues.publication.PublicationVue;
64
import org.tela_botanica.client.vues.publication.PublicationVue;
65
import org.tela_botanica.client.vues.structure.StructureForm;
65
import org.tela_botanica.client.vues.structure.StructureForm;
66
import org.tela_botanica.client.vues.structure.StructureVue;
66
import org.tela_botanica.client.vues.structure.StructureVue;
67
 
67
 
68
import com.extjs.gxt.ui.client.Registry;
68
import com.extjs.gxt.ui.client.Registry;
69
import com.extjs.gxt.ui.client.Style.LayoutRegion;
69
import com.extjs.gxt.ui.client.Style.LayoutRegion;
70
import com.extjs.gxt.ui.client.event.Listener;
70
import com.extjs.gxt.ui.client.event.Listener;
71
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
71
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
72
import com.extjs.gxt.ui.client.util.Margins;
72
import com.extjs.gxt.ui.client.util.Margins;
73
import com.extjs.gxt.ui.client.widget.Component;
73
import com.extjs.gxt.ui.client.widget.Component;
74
import com.extjs.gxt.ui.client.widget.Dialog;
74
import com.extjs.gxt.ui.client.widget.Dialog;
75
import com.extjs.gxt.ui.client.widget.Info;
75
import com.extjs.gxt.ui.client.widget.Info;
76
import com.extjs.gxt.ui.client.widget.MessageBox;
76
import com.extjs.gxt.ui.client.widget.MessageBox;
77
import com.extjs.gxt.ui.client.widget.Viewport;
77
import com.extjs.gxt.ui.client.widget.Viewport;
78
import com.extjs.gxt.ui.client.widget.button.Button;
78
import com.extjs.gxt.ui.client.widget.button.Button;
79
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
79
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
80
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
80
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
81
import com.google.gwt.core.client.GWT;
81
import com.google.gwt.core.client.GWT;
82
import com.google.gwt.i18n.client.Dictionary;
82
import com.google.gwt.i18n.client.Dictionary;
83
import com.google.gwt.user.client.Window;
83
import com.google.gwt.user.client.Window;
84
import com.google.gwt.user.client.ui.RootPanel;
84
import com.google.gwt.user.client.ui.RootPanel;
85
 
85
 
86
public class Mediateur implements Rafraichissable {
86
public class Mediateur implements Rafraichissable {
87
	
87
	
88
	private Viewport viewport;
88
	private Viewport viewport;
89
	private Modele modele = null;
89
	private Modele modele = null;
90
	public static final Constantes i18nC = getI18nConstante();
90
	public static final Constantes i18nC = getI18nConstante();
91
	public static final ErrorMessages i18nM = getI18nMessage();
91
	public static final ErrorMessages i18nM = getI18nMessage();
92
	
92
	
93
	private EnteteVue panneauNord = null;
93
	private EnteteVue panneauNord = null;
94
	private NavigationVue panneauOuest = null;
94
	private NavigationVue panneauOuest = null;
95
	private ContenuVue panneauCentre = null;
95
	private ContenuVue panneauCentre = null;
96
	private StatutVue panneauSud = null;
96
	private StatutVue panneauSud = null;
97
	
97
	
98
	private IdentificationFenetre fenetreIdentification = null;
98
	private IdentificationFenetre fenetreIdentification = null;
99
	
99
	
100
	public Mediateur() {
100
	public Mediateur() {
101
		// Enregistrement du Médiateur dans le Registre
101
		// Enregistrement du Médiateur dans le Registre
102
		Registry.register(RegistreId.MEDIATEUR, this);
102
		Registry.register(RegistreId.MEDIATEUR, this);
103
 
103
 
104
		//Initialisation du Registre
104
		//Initialisation du Registre
105
		initialiserRegistre();
105
		initialiserRegistre();
106
		
106
		
107
		// Création du Modèle qui s'enregistre lui même dans le Registre
107
		// Création du Modèle qui s'enregistre lui même dans le Registre
108
		modele = new Modele();
108
		modele = new Modele();
109
 
109
 
110
		// Création du Viewport qui contient la disposition globale de l'application
110
		// Création du Viewport qui contient la disposition globale de l'application
111
		viewport = new Viewport();
111
		viewport = new Viewport();
112
		viewport.setLayout(new BorderLayout());
112
		viewport.setLayout(new BorderLayout());
113
 
113
 
114
		// Création des différents panneaux
114
		// Création des différents panneaux
115
	    creerPanneauNord();
115
	    creerPanneauNord();
116
	    creerPanneauOuest();
116
	    creerPanneauOuest();
117
	    creerPanneauCentral();
117
	    creerPanneauCentral();
118
	    creerPanneauSud();
118
	    creerPanneauSud();
119
		
119
		
120
		// Connection de l'utilisateur
120
		// Connection de l'utilisateur
121
		connecterUtilisateur(null, null);
121
		connecterUtilisateur(null, null);
122
		
122
		
123
		// Retour à GWT du Viewport une fois constuit
123
		// Retour à GWT du Viewport une fois constuit
124
		RootPanel.get().add(viewport);
124
		RootPanel.get().add(viewport);
125
	}
125
	}
126
	
126
	
127
	//+----------------------------------------------------------------------------------------------------------------+
127
	//+----------------------------------------------------------------------------------------------------------------+
128
	//												GESTION de l'I18N et du REGISTRE
128
	//												GESTION de l'I18N et du REGISTRE
129
	//+----------------------------------------------------------------------------------------------------------------+
129
	//+----------------------------------------------------------------------------------------------------------------+
130
	protected static Constantes getI18nConstante() {
130
	protected static Constantes getI18nConstante() {
131
		return GWT.create(Constantes.class);
131
		return GWT.create(Constantes.class);
132
	}
132
	}
133
	
133
	
134
	protected static ErrorMessages getI18nMessage() {
134
	protected static ErrorMessages getI18nMessage() {
135
		return GWT.create(ErrorMessages.class);
135
		return GWT.create(ErrorMessages.class);
136
	}
136
	}
137
	
137
	
138
	protected void initialiserRegistre() {
138
	protected void initialiserRegistre() {
139
		Registry.register(RegistreId.APPLI_NOM, i18nC.appliNom());
139
		Registry.register(RegistreId.APPLI_NOM, i18nC.appliNom());
140
		Registry.register(RegistreId.APPLI_CODE, i18nC.appliCode());
140
		Registry.register(RegistreId.APPLI_CODE, i18nC.appliCode());
141
		Registry.register(RegistreId.APPLI_VERSION, i18nC.appliVersionNumero());
141
		Registry.register(RegistreId.APPLI_VERSION, i18nC.appliVersionNumero());
142
		
142
		
143
		APropos apropos = new APropos();
143
		APropos apropos = new APropos();
144
		Registry.register(RegistreId.APPLI_REVISION, apropos.getRevisionGlobale());
144
		Registry.register(RegistreId.APPLI_REVISION, apropos.getRevisionGlobale());
145
		Registry.register(RegistreId.APPLI_COMPILATION_JAVA_VERSION, apropos.getVersionJavaCompilation());
145
		Registry.register(RegistreId.APPLI_COMPILATION_JAVA_VERSION, apropos.getVersionJavaCompilation());
146
		Registry.register(RegistreId.APPLI_COMPILATION_DATE_HEURE, apropos.getDateHeureCompilation());
146
		Registry.register(RegistreId.APPLI_COMPILATION_DATE_HEURE, apropos.getDateHeureCompilation());
147
 
147
 
148
		Registry.register(RegistreId.CONFIG, new Configuration());
148
		Registry.register(RegistreId.CONFIG, new Configuration());
149
		Registry.register(RegistreId.POPUP_CHARGEMENT, new PopupChargement(this));
149
		Registry.register(RegistreId.POPUP_CHARGEMENT, new PopupChargement(this));
150
		Registry.register(RegistreId.UTILISATEUR_COURANT, new Utilisateur());
150
		Registry.register(RegistreId.UTILISATEUR_COURANT, new Utilisateur());
151
		Registry.register(RegistreId.PROJET_COURANT, new Projet());
151
		Registry.register(RegistreId.PROJET_COURANT, new Projet());
152
	}
152
	}
153
	
153
	
154
	//+----------------------------------------------------------------------------------------------------------------+
154
	//+----------------------------------------------------------------------------------------------------------------+
155
	//												GESTION des PANNEAUX PRINCIPAUX
155
	//												GESTION des PANNEAUX PRINCIPAUX
156
	//+----------------------------------------------------------------------------------------------------------------+
156
	//+----------------------------------------------------------------------------------------------------------------+
157
	
157
	
158
	private void creerPanneauNord() {
158
	private void creerPanneauNord() {
159
		panneauNord = new EnteteVue(this);
159
		panneauNord = new EnteteVue(this);
160
		
160
		
161
		BorderLayoutData regionNord = new BorderLayoutData(LayoutRegion.NORTH, 100);  
161
		BorderLayoutData regionNord = new BorderLayoutData(LayoutRegion.NORTH, 100);  
162
		regionNord.setCollapsible(true);
162
		regionNord.setCollapsible(true);
163
		regionNord.setFloatable(true);
163
		regionNord.setFloatable(true);
164
		regionNord.setSplit(false);
164
		regionNord.setSplit(false);
165
		regionNord.setMargins(new Margins(5, 5, 0, 5));
165
		regionNord.setMargins(new Margins(5, 5, 0, 5));
166
		
166
		
167
		viewport.add(panneauNord, regionNord);
167
		viewport.add(panneauNord, regionNord);
168
	}
168
	}
169
	
169
	
170
	private void creerPanneauOuest() {
170
	private void creerPanneauOuest() {
171
		panneauOuest = new NavigationVue(this); 
171
		panneauOuest = new NavigationVue(this); 
172
		
172
		
173
		BorderLayoutData regionOuest = new BorderLayoutData(LayoutRegion.WEST, 200);  
173
		BorderLayoutData regionOuest = new BorderLayoutData(LayoutRegion.WEST, 200);  
174
		regionOuest.setSplit(true);
174
		regionOuest.setSplit(true);
175
		regionOuest.setCollapsible(true);  
175
		regionOuest.setCollapsible(true);  
176
		regionOuest.setMargins(new Margins(5));
176
		regionOuest.setMargins(new Margins(5));
177
 
177
 
178
		viewport.add(panneauOuest, regionOuest);
178
		viewport.add(panneauOuest, regionOuest);
179
	}
179
	}
180
 
180
 
181
	private void creerPanneauCentral() {
181
	private void creerPanneauCentral() {
182
		panneauCentre = new ContenuVue(this);
182
		panneauCentre = new ContenuVue(this);
183
 
183
 
184
		BorderLayoutData regionCentre = new BorderLayoutData(LayoutRegion.CENTER);  
184
		BorderLayoutData regionCentre = new BorderLayoutData(LayoutRegion.CENTER);  
185
		regionCentre.setMargins(new Margins(5, 5, 5, 0));
185
		regionCentre.setMargins(new Margins(5, 5, 5, 0));
186
 
186
 
187
		viewport.add(panneauCentre, regionCentre);
187
		viewport.add(panneauCentre, regionCentre);
188
	}
188
	}
189
	
189
	
190
	private void creerPanneauSud() {
190
	private void creerPanneauSud() {
191
		panneauSud = new StatutVue();
191
		panneauSud = new StatutVue();
192
		
192
		
193
		BorderLayoutData regionSud = new BorderLayoutData(LayoutRegion.SOUTH, 20); 
193
		BorderLayoutData regionSud = new BorderLayoutData(LayoutRegion.SOUTH, 20); 
194
		regionSud.setCollapsible(true);
194
		regionSud.setCollapsible(true);
195
		regionSud.setFloatable(true);
195
		regionSud.setFloatable(true);
196
		regionSud.setSplit(false);
196
		regionSud.setSplit(false);
197
		regionSud.setMargins(new Margins(0));
197
		regionSud.setMargins(new Margins(0));
198
		
198
		
199
		viewport.add(panneauSud, regionSud);
199
		viewport.add(panneauSud, regionSud);
200
	}
200
	}
201
 
201
 
202
	public void actualiserPanneauCentral() {
202
	public void actualiserPanneauCentral() {
203
		panneauCentre.layout();
203
		panneauCentre.layout();
204
	}
204
	}
205
	
205
	
206
	//+----------------------------------------------------------------------------------------------------------------+
206
	//+----------------------------------------------------------------------------------------------------------------+
207
	//												GESTION du MENU
207
	//												GESTION du MENU
208
	//+----------------------------------------------------------------------------------------------------------------+
208
	//+----------------------------------------------------------------------------------------------------------------+
209
	
209
	
210
	public void clicMenu(String codeMenuClique) {
210
	public void clicMenu(String codeMenuClique) {
211
		activerChargement(codeMenuClique);
211
		activerChargement(codeMenuClique);
212
		panneauOuest.getMenu().selectionMenu(codeMenuClique);
212
		panneauOuest.getMenu().selectionMenu(codeMenuClique);
213
		if (codeMenuClique.equals(MenuApplicationId.ACCUEIL)) {
213
		if (codeMenuClique.equals(MenuApplicationId.ACCUEIL)) {
214
			afficherAccueil();
214
			afficherAccueil();
215
		} else if (codeMenuClique.equals(MenuApplicationId.PROJET)) {
215
		} else if (codeMenuClique.equals(MenuApplicationId.PROJET)) {
216
			selectionnerProjet(panneauCentre, null); 
216
			selectionnerProjet(panneauCentre, null); 
217
		} else if (codeMenuClique.equals(MenuApplicationId.STRUCTURE)) {
217
		} else if (codeMenuClique.equals(MenuApplicationId.STRUCTURE)) {
218
			selectionnerStructure(panneauCentre, null);
218
			selectionnerStructure(panneauCentre, null);
219
		} else if (codeMenuClique.equals(MenuApplicationId.COLLECTION)) { 
219
		} else if (codeMenuClique.equals(MenuApplicationId.COLLECTION)) { 
220
			selectionnerCollection(panneauCentre, null);
220
			selectionnerCollection(panneauCentre, null);
221
		} else if (codeMenuClique.equals(MenuApplicationId.PERSONNE)) { 
221
		} else if (codeMenuClique.equals(MenuApplicationId.PERSONNE)) { 
222
			selectionnerPersonne(panneauCentre, null, null);
222
			selectionnerPersonne(panneauCentre, null, null);
223
		} else if (codeMenuClique.equals(MenuApplicationId.PUBLICATION)) {
223
		} else if (codeMenuClique.equals(MenuApplicationId.PUBLICATION)) {
224
			selectionnerPublication(panneauCentre, null);
224
			selectionnerPublication(panneauCentre, null);
225
		} else if (codeMenuClique.equals(MenuApplicationId.COMMENTAIRE)) {
225
		} else if (codeMenuClique.equals(MenuApplicationId.COMMENTAIRE)) {
226
			selectionnerCommentaire(panneauCentre, null);
226
			selectionnerCommentaire(panneauCentre, null);
227
		} else {
227
		} else {
228
			GWT.log(i18nM.nonImplemente(codeMenuClique), null);
228
			GWT.log(i18nM.nonImplemente(codeMenuClique), null);
229
		}
229
		}
230
		panneauCentre.layout();
230
		panneauCentre.layout();
231
	}
231
	}
232
 
232
 
233
	public void activerChargement(String message) {
233
	public void activerChargement(String message) {
234
		Debug.log(message);
234
		Debug.log(message);
235
		afficherPopinChargement(); 
235
		afficherPopinChargement(); 
236
		panneauSud.showBusy(i18nC.chargement()+" "+message);
236
		panneauSud.showBusy(i18nC.chargement()+" "+message);
237
	}
237
	}
238
	
238
	
239
	public void desactiverChargement() {
239
	public void desactiverChargement() {
240
		masquerPopinChargement();
240
		masquerPopinChargement();
241
		panneauSud.clear();
241
		panneauSud.clear();
242
	}
242
	}
243
		
243
		
244
	//+----------------------------------------------------------------------------------------------------------------+
244
	//+----------------------------------------------------------------------------------------------------------------+
245
	//												GESTION DES FENÊTRES
245
	//												GESTION DES FENÊTRES
246
	//+----------------------------------------------------------------------------------------------------------------+
246
	//+----------------------------------------------------------------------------------------------------------------+
247
 
247
 
248
	public void ouvrirAide() {
248
	public void ouvrirAide() {
249
		AideFenetre aideFenetre = new AideFenetre();
249
		AideFenetre aideFenetre = new AideFenetre();
250
		aideFenetre.show();
250
		aideFenetre.show();
251
		// FIXME : apparament le fade In/Fade Out pose problème sur les navigateurs...
251
		// FIXME : apparament le fade In/Fade Out pose problème sur les navigateurs...
252
		//aideFenetre.el().fadeIn(FxConfig.NONE);
252
		//aideFenetre.el().fadeIn(FxConfig.NONE);
253
	}
253
	}
254
 
254
 
255
	public void ouvrirParametres() {
255
	public void ouvrirParametres() {
256
		ParametreFenetre parametresFenetre = new ParametreFenetre();
256
		ParametreFenetre parametresFenetre = new ParametreFenetre();
257
		parametresFenetre.show();
257
		parametresFenetre.show();
258
	}
258
	}
259
 
259
 
260
	public void ouvrirIdentification() {
260
	public void ouvrirIdentification() {
261
		fenetreIdentification = new IdentificationFenetre();
261
		fenetreIdentification = new IdentificationFenetre(this);
262
		fenetreIdentification.show();
262
		fenetreIdentification.show();
263
	}
263
	}
264
 
264
 
265
	public void ouvrirUrlExterne(String id) {
265
	public void ouvrirUrlExterne(String id) {
266
		if (id.equals(ComposantId.MENU_CEL)) {
266
		if (id.equals(ComposantId.MENU_CEL)) {
267
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("cel"), "Carnet en ligne", "");
267
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("cel"), "Carnet en ligne", "");
268
		} else if (id.equals(ComposantId.MENU_BEL)) {
268
		} else if (id.equals(ComposantId.MENU_BEL)) {
269
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("cel"), "Biblio en ligne", "");
269
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("cel"), "Biblio en ligne", "");
270
		} else if (id.equals(ComposantId.MENU_BOGUE)) {
270
		} else if (id.equals(ComposantId.MENU_BOGUE)) {
271
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("bogue"), "Bogue", "");
271
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("bogue"), "Bogue", "");
272
		} else if (id.equals(ComposantId.MENU_COMMENTAIRE)) {
272
		} else if (id.equals(ComposantId.MENU_COMMENTAIRE)) {
273
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("commentaire"), "Commentaire", "");
273
			Window.open(((Configuration) Registry.get(RegistreId.CONFIG)).getUrl("commentaire"), "Commentaire", "");
274
		}
274
		}
275
	}
275
	}
276
 
276
 
277
	public void afficherFenetreLicence(IdentificationFenetre vue)	{
277
	public void afficherFenetreLicence(IdentificationFenetre vue)	{
278
		LicenceFenetre lf = new LicenceFenetre(vue);
278
		LicenceFenetre lf = new LicenceFenetre(vue);
279
	}
279
	}
280
	
280
	
281
	public void accepterLicence(Rafraichissable vue)	{
281
	public void accepterLicence(Rafraichissable vue)	{
282
		modele.accepterLicence(vue);		
282
		modele.accepterLicence(vue);		
283
	}
283
	}
284
	//+----------------------------------------------------------------------------------------------------------------+
284
	//+----------------------------------------------------------------------------------------------------------------+
285
	//												GESTION de l'UTILISATEUR et de l'IDENTIFICATION
285
	//												GESTION de l'UTILISATEUR et de l'IDENTIFICATION
286
	//+----------------------------------------------------------------------------------------------------------------+
286
	//+----------------------------------------------------------------------------------------------------------------+
287
	/**
287
	/**
288
	 * Retourne l'identifiant de l'utilisateur courrant de l'application.
288
	 * Retourne l'identifiant de l'utilisateur courrant de l'application.
289
	 */
289
	 */
290
	public String getUtilisateurId() {
290
	public String getUtilisateurId() {
291
		String id = null;
291
		String id = null;
292
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
292
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
293
		if (!utilisateurCourant.getId().equals("")) {
293
		if (!utilisateurCourant.getId().equals("")) {
294
			id = utilisateurCourant.getId();
294
			id = utilisateurCourant.getId();
295
		}
295
		}
296
		return id;
296
		return id;
297
	}
297
	}
298
	
298
	
299
	public Utilisateur getUtilisateur() {
299
	public Utilisateur getUtilisateur() {
300
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
300
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
301
		return utilisateurCourant;
301
		return utilisateurCourant;
302
	}
302
	}
303
	
303
	
304
	public void connecterUtilisateur(String login, String mdp) {
304
	public void connecterUtilisateur(String login, String mdp) {
305
		modele.connecterUtilisateur(this, login, mdp);
305
		modele.connecterUtilisateur(this, login, mdp);
306
	}
306
	}
307
	
307
	
308
	public void deconnecterUtilisateur() {
308
	public void deconnecterUtilisateur() {
309
		modele.deconnecterUtilisateur(this);
309
		modele.deconnecterUtilisateur(this);
310
	}
310
	}
311
	
311
	
312
	public void repandreEtatIdentification(Utilisateur utilisateur) {
312
	public void repandreEtatIdentification(Utilisateur utilisateur) {
313
		// Mise à jour du registre
313
		// Mise à jour du registre
314
		Registry.register(RegistreId.UTILISATEUR_COURANT, utilisateur);
314
		Registry.register(RegistreId.UTILISATEUR_COURANT, utilisateur);
315
		// Propagation de l'information de mise à jour de l'utilisateur
315
		// Propagation de l'information de mise à jour de l'utilisateur
316
		repandreInfoMiseAJourUtilisateur();
316
		repandreInfoMiseAJourUtilisateur();
317
	}
317
	}
318
	
318
	
319
	public void repandreInfoMiseAJourUtilisateur() {
319
	public void repandreInfoMiseAJourUtilisateur() {
320
		// Création de l'information de mise à jour de l'utilisateur
320
		// Création de l'information de mise à jour de l'utilisateur
321
		Information info = new Information("maj_utilisateur");
321
		Information info = new Information("maj_utilisateur");
322
 
322
 
323
		// Rafraichissement de la fenêtre d'Identification
323
		// Rafraichissement de la fenêtre d'Identification
324
		if (fenetreIdentification != null && fenetreIdentification.isVisible()) {
324
		if (fenetreIdentification != null && fenetreIdentification.isVisible()) {
325
			fenetreIdentification.rafraichir(info);
325
			fenetreIdentification.rafraichir(info);
326
		}
326
		}
327
		
327
		
328
		// Rafraichissement du panneau Nord
328
		// Rafraichissement du panneau Nord
329
		panneauNord.rafraichir(info);
329
		panneauNord.rafraichir(info);
330
 
330
 
331
		// Rafraichissement du panneau Centre
331
		// Rafraichissement du panneau Centre
332
		if (panneauCentre != null) {
332
		if (panneauCentre != null) {
333
			panneauCentre.rafraichir(info);
333
			panneauCentre.rafraichir(info);
334
		}
334
		}
335
	}
335
	}
336
	
336
	
337
	public void modifierUtilisateur()	{
337
	public void modifierUtilisateur()	{
338
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
338
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
339
		panneauNord.rafraichir(utilisateurCourant);
339
		panneauNord.rafraichir(utilisateurCourant);
340
		modele.modifierUtilisateur(this, utilisateurCourant);
340
		modele.modifierUtilisateur(this, utilisateurCourant);
341
	}
341
	}
342
	
342
	
343
	public void mettreAJourPersonneAnnuaire(Utilisateur utilisateur)	{
343
	public void mettreAJourPersonneAnnuaire(Utilisateur utilisateur)	{
344
		panneauNord.rafraichir(utilisateur);
344
		panneauNord.rafraichir(utilisateur);
345
		modele.mettreAJourPersonneAnnuaire(this, utilisateur);
345
		modele.mettreAJourPersonneAnnuaire(this, utilisateur);
346
	}
346
	}
347
 
347
 
348
	//+----------------------------------------------------------------------------------------------------------------+
348
	//+----------------------------------------------------------------------------------------------------------------+
349
	//												GESTION DES VALEURS ET LISTES
349
	//												GESTION DES VALEURS ET LISTES
350
	//+----------------------------------------------------------------------------------------------------------------+
350
	//+----------------------------------------------------------------------------------------------------------------+
351
 
351
 
352
	public void obtenirListeValeurEtRafraichir(Rafraichissable vueARafraichir, String listeId)	{
352
	public void obtenirListeValeurEtRafraichir(Rafraichissable vueARafraichir, String listeId)	{
353
		modele.obtenirListeValeurs(vueARafraichir, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId));
353
		modele.obtenirListeValeurs(vueARafraichir, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId));
354
	}
354
	}
355
	
355
	
356
	public void obtenirValeurEtRafraichir(Rafraichissable vue, String listeId, String identifiantValeur)	{
356
	public void obtenirValeurEtRafraichir(Rafraichissable vue, String listeId, String identifiantValeur)	{
357
		modele.obtenirValeur(vue, "abv", ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId), identifiantValeur);
357
		modele.obtenirValeur(vue, "abv", ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId), identifiantValeur);
358
	}
358
	}
359
	
359
	
360
	public void obtenirListeRegionsEtRafraichir(Rafraichissable vue, String strListeId, String strPays)	{
360
	public void obtenirListeRegionsEtRafraichir(Rafraichissable vue, String strListeId, String strPays)	{
361
		modele.obtenirListeRegion(vue, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(strListeId), strPays+".__");
361
		modele.obtenirListeRegion(vue, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(strListeId), strPays+".__");
362
	}
362
	}
363
	
363
	
364
	//+----------------------------------------------------------------------------------------------------------------+
364
	//+----------------------------------------------------------------------------------------------------------------+
365
	//												GESTION des APPLETS de l'ACCUEIL
365
	//												GESTION des APPLETS de l'ACCUEIL
366
	//+----------------------------------------------------------------------------------------------------------------+
366
	//+----------------------------------------------------------------------------------------------------------------+
367
	
367
	
368
	public void afficherAccueil() {
368
	public void afficherAccueil() {
369
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {
369
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {
370
			panneauCentre.removeAll();
370
			panneauCentre.removeAll();
371
			panneauCentre.add(new AccueilVue(this));
371
			panneauCentre.add(new AccueilVue(this));
372
		}
372
		}
373
	}
373
	}
374
	
374
	
375
	//+----------------------------------------------------------------------------------------------------------------+
375
	//+----------------------------------------------------------------------------------------------------------------+
376
	//												GESTION des PROJETS
376
	//												GESTION des PROJETS
377
	//+----------------------------------------------------------------------------------------------------------------+
377
	//+----------------------------------------------------------------------------------------------------------------+
378
	
378
	
379
	public void afficherFormProjet(String projetId) {
379
	public void afficherFormProjet(String projetId) {
380
		panneauCentre.removeAll();
380
		panneauCentre.removeAll();
381
		ProjetForm projetForm = new ProjetForm(this, projetId);
381
		ProjetForm projetForm = new ProjetForm(this, projetId);
382
		panneauCentre.add(projetForm);
382
		panneauCentre.add(projetForm);
383
		
383
		
384
		panneauCentre.layout();
384
		panneauCentre.layout();
385
	}
385
	}
386
	
386
	
387
	public void afficherListeProjets(ProjetListe projetsACharger)	{
387
	public void afficherListeProjets(ProjetListe projetsACharger)	{
388
		if (!(panneauCentre.getContenu() instanceof ProjetVue))	{
388
		if (!(panneauCentre.getContenu() instanceof ProjetVue))	{
389
			panneauCentre.removeAll();
389
			panneauCentre.removeAll();
390
			panneauCentre.add(new ProjetVue(this));
390
			panneauCentre.add(new ProjetVue(this));
391
			panneauCentre.setId(ComposantId.PANNEAU_PROJET_LISTE);
391
			panneauCentre.setId(ComposantId.PANNEAU_PROJET_LISTE);
392
			panneauCentre.layout();
392
			panneauCentre.layout();
393
		}	
393
		}	
394
		
394
		
395
		panneauCentre.getContenu().rafraichir(projetsACharger);
395
		panneauCentre.getContenu().rafraichir(projetsACharger);
396
	}
396
	}
397
	
397
	
398
	public void clicListeProjet(Projet projet) {
398
	public void clicListeProjet(Projet projet) {
399
		panneauCentre.getContenu().rafraichir(projet);
399
		panneauCentre.getContenu().rafraichir(projet);
400
	}
400
	}
401
 
401
 
402
	public void clicSupprimerProjet(final List<Projet> projetListe) {
402
	public void clicSupprimerProjet(final List<Projet> projetListe) {
403
		if (projetListe.size() <= 0) {
403
		if (projetListe.size() <= 0) {
404
			MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); 
404
			MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); 
405
		} else {
405
		} else {
406
			String message = "Voulez-vous vraiment supprimer ces projets ?";
406
			String message = "Voulez-vous vraiment supprimer ces projets ?";
407
			if (projetListe.size() == 1) {
407
			if (projetListe.size() == 1) {
408
				message = "Voulez-vous vraiment supprimer ce projet ?";
408
				message = "Voulez-vous vraiment supprimer ce projet ?";
409
			}
409
			}
410
			
410
			
411
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
411
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
412
				public void handleEvent(MessageBoxEvent ce) {  
412
				public void handleEvent(MessageBoxEvent ce) {  
413
					Dialog dialog = (Dialog) ce.getComponent();
413
					Dialog dialog = (Dialog) ce.getComponent();
414
				    Button btn = ce.getButtonClicked();  
414
				    Button btn = ce.getButtonClicked();  
415
				    	   
415
				    	   
416
				    if (btn.getText().equals(dialog.yesText)) {
416
				    if (btn.getText().equals(dialog.yesText)) {
417
				    	modele.supprimerProjet(panneauCentre.getContenu(), projetListe);  
417
				    	modele.supprimerProjet(panneauCentre.getContenu(), projetListe);  
418
				    }
418
				    }
419
				}
419
				}
420
			};
420
			};
421
				     
421
				     
422
			MessageBox.confirm("Supprimer un projet", message, listenerSuppression);
422
			MessageBox.confirm("Supprimer un projet", message, listenerSuppression);
423
		}
423
		}
424
		
424
		
425
	}
425
	}
426
 
426
 
427
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
427
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
428
		if (projetsSelectionnes.size() == 0) {
428
		if (projetsSelectionnes.size() == 0) {
429
			Info.display("Information", "Veuillez sélectionner un projet.");
429
			Info.display("Information", "Veuillez sélectionner un projet.");
430
		} else if (projetsSelectionnes.size() > 1) {
430
		} else if (projetsSelectionnes.size() > 1) {
431
			Info.display("Information", "Veuillez sélectionner un seul projet à la fois.");
431
			Info.display("Information", "Veuillez sélectionner un seul projet à la fois.");
432
		} else if (projetsSelectionnes.size() == 1) {
432
		} else if (projetsSelectionnes.size() == 1) {
433
			afficherFormProjet(projetsSelectionnes.get(0).getId());
433
			afficherFormProjet(projetsSelectionnes.get(0).getId());
434
		} else {
434
		} else {
435
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierProjet() du Médiateur.");
435
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierProjet() du Médiateur.");
436
		}
436
		}
437
	}
437
	}
438
 
438
 
439
	public void clicAjouterProjet() {
439
	public void clicAjouterProjet() {
440
		afficherFormProjet(null);
440
		afficherFormProjet(null);
441
	}
441
	}
442
 
442
 
443
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId) {
443
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId) {
444
		modele.selectionnerProjet(vueARafraichir, projetId);
444
		modele.selectionnerProjet(vueARafraichir, projetId);
445
	}
445
	}
446
 
446
 
447
	public void ajouterProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
447
	public void ajouterProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
448
		modele.ajouterProjet(vueARafraichir, projetCollecte);
448
		modele.ajouterProjet(vueARafraichir, projetCollecte);
449
	}
449
	}
450
 
450
 
451
	public void modifierProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
451
	public void modifierProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
452
		modele.modifierProjet(vueARafraichir, projetCollecte);	
452
		modele.modifierProjet(vueARafraichir, projetCollecte);	
453
	}
453
	}
454
	
454
	
455
	//+----------------------------------------------------------------------------------------------------------------+
455
	//+----------------------------------------------------------------------------------------------------------------+
456
	// SELECTION : projet
456
	// SELECTION : projet
457
	/**
457
	/**
458
	 * Retourne l'identifiant du projet courrant de l'application.
458
	 * Retourne l'identifiant du projet courrant de l'application.
459
	 */
459
	 */
460
	public String getProjetId() {
460
	public String getProjetId() {
461
		String id = null;
461
		String id = null;
462
		Projet projetCourant = (Projet) Registry.get(RegistreId.PROJET_COURANT);
462
		Projet projetCourant = (Projet) Registry.get(RegistreId.PROJET_COURANT);
463
		if (projetCourant != null && !projetCourant.getId().equals("")) {
463
		if (projetCourant != null && !projetCourant.getId().equals("")) {
464
			id = projetCourant.getId();
464
			id = projetCourant.getId();
465
		}
465
		}
466
		return id;
466
		return id;
467
	}
467
	}
468
		
468
		
469
	public void selectionnerProjetCourant(Projet projetSelectionne) {
469
	public void selectionnerProjetCourant(Projet projetSelectionne) {
470
		Registry.register(RegistreId.PROJET_COURANT, projetSelectionne);
470
		Registry.register(RegistreId.PROJET_COURANT, projetSelectionne);
471
		if (panneauCentre.getContenu() instanceof ProjetVue)	{
471
		if (panneauCentre.getContenu() instanceof ProjetVue)	{
472
			selectionnerProjet(panneauCentre.getContenu(), null);
472
			selectionnerProjet(panneauCentre.getContenu(), null);
473
		} else if (panneauCentre.getContenu() instanceof StructureVue)	{
473
		} else if (panneauCentre.getContenu() instanceof StructureVue)	{
474
			selectionnerStructure(panneauCentre.getContenu(), null);
474
			selectionnerStructure(panneauCentre.getContenu(), null);
475
		} else if (panneauCentre.getContenu() instanceof CollectionVue)	{
475
		} else if (panneauCentre.getContenu() instanceof CollectionVue)	{
476
			selectionnerCollection(panneauCentre.getContenu(), null);
476
			selectionnerCollection(panneauCentre.getContenu(), null);
477
		} else if (panneauCentre.getContenu() instanceof PersonneVue) {
477
		} else if (panneauCentre.getContenu() instanceof PersonneVue) {
478
			selectionnerPersonne(panneauCentre.getContenu(), null, getProjetId());
478
			selectionnerPersonne(panneauCentre.getContenu(), null, getProjetId());
479
		} else if (panneauCentre.getContenu() instanceof PublicationVue) {
479
		} else if (panneauCentre.getContenu() instanceof PublicationVue) {
480
			selectionnerPublication(panneauCentre.getContenu(), null);
480
			selectionnerPublication(panneauCentre.getContenu(), null);
481
		} else if (panneauCentre.getContenu() instanceof CommentaireVue) {
481
		} else if (panneauCentre.getContenu() instanceof CommentaireVue) {
482
			selectionnerCommentaire(panneauCentre.getContenu(), null);
482
			selectionnerCommentaire(panneauCentre.getContenu(), null);
483
		}
483
		}
484
	}
484
	}
485
	
485
	
486
	
486
	
487
	//+----------------------------------------------------------------------------------------------------------------+
487
	//+----------------------------------------------------------------------------------------------------------------+
488
	//												GESTION DES STRUCTURES
488
	//												GESTION DES STRUCTURES
489
	//+----------------------------------------------------------------------------------------------------------------+
489
	//+----------------------------------------------------------------------------------------------------------------+
490
 
490
 
491
	public void afficherListeStructures(StructureListe structuresACharger) {
491
	public void afficherListeStructures(StructureListe structuresACharger) {
492
		if (!(panneauCentre.getContenu() instanceof StructureVue))	{	
492
		if (!(panneauCentre.getContenu() instanceof StructureVue))	{	
493
			panneauCentre.removeAll();
493
			panneauCentre.removeAll();
494
			panneauCentre.add(new StructureVue(this));
494
			panneauCentre.add(new StructureVue(this));
495
		}
495
		}
496
		panneauCentre.getContenu().rafraichir(structuresACharger);
496
		panneauCentre.getContenu().rafraichir(structuresACharger);
497
	}
497
	}
498
	
498
	
499
	public void afficherFormStructure(String structureId) {
499
	public void afficherFormStructure(String structureId) {
500
		String mode = Formulaire.MODE_AJOUTER;
500
		String mode = Formulaire.MODE_AJOUTER;
501
		if (structureId != null) {
501
		if (structureId != null) {
502
			mode = Formulaire.MODE_MODIFIER;
502
			mode = Formulaire.MODE_MODIFIER;
503
		}
503
		}
504
		
504
		
505
		panneauCentre.removeAll();
505
		panneauCentre.removeAll();
506
		StructureForm structureForm = new StructureForm(this, mode);
506
		StructureForm structureForm = new StructureForm(this, mode);
507
		panneauCentre.add(structureForm);
507
		panneauCentre.add(structureForm);
508
		
508
		
509
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
509
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
510
			selectionnerStructure(structureForm, structureId);
510
			selectionnerStructure(structureForm, structureId);
511
			selectionnerStructureAPersonne(structureForm, structureId, StructureAPersonne.ROLE_EQUIPE);
511
			selectionnerStructureAPersonne(structureForm, structureId, StructureAPersonne.ROLE_EQUIPE);
512
		}
512
		}
513
		
513
		
514
		panneauCentre.layout();
514
		panneauCentre.layout();
515
	}
515
	}
516
	
516
	
517
	public void clicListeStructure(Structure structure) {
517
	public void clicListeStructure(Structure structure) {
518
		panneauCentre.getContenu().rafraichir(structure);
518
		panneauCentre.getContenu().rafraichir(structure);
519
		if (structure != null && structure.getPersonnel() == null) {
519
		if (structure != null && structure.getPersonnel() == null) {
520
			selectionnerStructureAPersonne(panneauCentre.getContenu(), structure.getId(), StructureAPersonne.ROLE_EQUIPE);
520
			selectionnerStructureAPersonne(panneauCentre.getContenu(), structure.getId(), StructureAPersonne.ROLE_EQUIPE);
521
		}
521
		}
522
	}
522
	}
523
 
523
 
524
	public void clicAjouterStructure() {
524
	public void clicAjouterStructure() {
525
		afficherFormStructure(null);
525
		afficherFormStructure(null);
526
	}
526
	}
527
	
527
	
528
	public void clicModifierStructure(List<Structure> structureSelection) {
528
	public void clicModifierStructure(List<Structure> structureSelection) {
529
		if (structureSelection.size() == 0) {
529
		if (structureSelection.size() == 0) {
530
			Info.display("Information", "Veuillez sélectionner une structure.");
530
			Info.display("Information", "Veuillez sélectionner une structure.");
531
		} else if (structureSelection.size() > 1) {
531
		} else if (structureSelection.size() > 1) {
532
			Info.display("Information", "Veuillez sélectionner une seule structure à la fois.");
532
			Info.display("Information", "Veuillez sélectionner une seule structure à la fois.");
533
		} else if (structureSelection.size() == 1) {
533
		} else if (structureSelection.size() == 1) {
534
			afficherFormStructure(structureSelection.get(0).getId());
534
			afficherFormStructure(structureSelection.get(0).getId());
535
		} else {
535
		} else {
536
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierStructure() du Médiateur.");
536
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierStructure() du Médiateur.");
537
		}
537
		}
538
	}
538
	}
539
	
539
	
540
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
540
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
541
		if (structureSelection.size() == 0) {
541
		if (structureSelection.size() == 0) {
542
			Info.display("Information", "Veuillez sélectionner une structure.");
542
			Info.display("Information", "Veuillez sélectionner une structure.");
543
		} else if(structureSelection.size() > 0) {
543
		} else if(structureSelection.size() > 0) {
544
			String titre = "Supprimer des structures";
544
			String titre = "Supprimer des structures";
545
			String message = "Êtes vous sur de vouloir supprimer les structures sélectionnées ?";
545
			String message = "Êtes vous sur de vouloir supprimer les structures sélectionnées ?";
546
			if (structureSelection.size() == 1) {
546
			if (structureSelection.size() == 1) {
547
				titre = "Supprimer une structure";
547
				titre = "Supprimer une structure";
548
				message = "Êtes vous sur de vouloir supprimer la structure sélectionnée ?";
548
				message = "Êtes vous sur de vouloir supprimer la structure sélectionnée ?";
549
			}
549
			}
550
			
550
			
551
			final Listener<MessageBoxEvent> suppressionEcouteur = new Listener<MessageBoxEvent>() { 
551
			final Listener<MessageBoxEvent> suppressionEcouteur = new Listener<MessageBoxEvent>() { 
552
				public void handleEvent(MessageBoxEvent ce) {  
552
				public void handleEvent(MessageBoxEvent ce) {  
553
					Dialog dialog = (Dialog) ce.getComponent();
553
					Dialog dialog = (Dialog) ce.getComponent();
554
					Button btn = ce.getButtonClicked();  
554
					Button btn = ce.getButtonClicked();  
555
 
555
 
556
					if (btn.getText().equals(dialog.yesText))	{
556
					if (btn.getText().equals(dialog.yesText))	{
557
						String idStr = "" ;
557
						String idStr = "" ;
558
						for(int i = 0 ; i < structureSelection.size() ; i++) {
558
						for(int i = 0 ; i < structureSelection.size() ; i++) {
559
							idStr += structureSelection.get(i).getId()+","; 
559
							idStr += structureSelection.get(i).getId()+","; 
560
						}
560
						}
561
						supprimerStructure(vue, idStr);
561
						supprimerStructure(vue, idStr);
562
					}
562
					}
563
				}
563
				}
564
			};
564
			};
565
			
565
			
566
			MessageBox.confirm(titre, message, suppressionEcouteur);
566
			MessageBox.confirm(titre, message, suppressionEcouteur);
567
		} else {
567
		} else {
568
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerStructure() du Médiateur.");
568
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerStructure() du Médiateur.");
569
		}
569
		}
570
	}
570
	}
571
	
571
	
572
	public void selectionnerStructure(Rafraichissable vueARafraichir, String structureId) {
572
	public void selectionnerStructure(Rafraichissable vueARafraichir, String structureId) {
573
		modele.selectionnerStructure(vueARafraichir, getProjetId(), structureId);
573
		modele.selectionnerStructure(vueARafraichir, getProjetId(), structureId);
574
	}
574
	}
575
	
575
	
576
	public void selectionnerStructureParProjet(Rafraichissable vueARafraichir, String projetId) {
576
	public void selectionnerStructureParProjet(Rafraichissable vueARafraichir, String projetId) {
577
		modele.selectionnerStructure(vueARafraichir, projetId, null);
577
		modele.selectionnerStructure(vueARafraichir, projetId, null);
578
	}
578
	}
579
	
579
	
580
	public void ajouterStructure(Rafraichissable vueARafraichir, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
580
	public void ajouterStructure(Rafraichissable vueARafraichir, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
581
		modele.ajouterStructure(vueARafraichir, structure, conservation, valorisation);
581
		modele.ajouterStructure(vueARafraichir, structure, conservation, valorisation);
582
	}
582
	}
583
	
583
	
584
	public void modifierStructure(Rafraichissable vueARafraichir, String structureId, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
584
	public void modifierStructure(Rafraichissable vueARafraichir, String structureId, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
585
		modele.modifierStructure(vueARafraichir, structureId, structure, conservation, valorisation);
585
		modele.modifierStructure(vueARafraichir, structureId, structure, conservation, valorisation);
586
	}
586
	}
587
	
587
	
588
	public void supprimerStructure(Rafraichissable vueARafraichir, String IdentifiantsStructureSepareParVirgule) {
588
	public void supprimerStructure(Rafraichissable vueARafraichir, String IdentifiantsStructureSepareParVirgule) {
589
		modele.supprimerStructure(vueARafraichir, IdentifiantsStructureSepareParVirgule);
589
		modele.supprimerStructure(vueARafraichir, IdentifiantsStructureSepareParVirgule);
590
	}
590
	}
591
	
591
	
592
	//+----------------------------------------------------------------------------------------------------------------+
592
	//+----------------------------------------------------------------------------------------------------------------+
593
	// GESTION de la relation STRUCTURE A PERSONNE
593
	// GESTION de la relation STRUCTURE A PERSONNE
594
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId) {
594
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId) {
595
		modele.selectionnerStructureAPersonne(vueARafraichir, structureId, roleId);
595
		modele.selectionnerStructureAPersonne(vueARafraichir, structureId, roleId);
596
	}
596
	}
597
	
597
	
598
	public void ajouterStructureAPersonne(Rafraichissable vueARafraichir, String structureId, StructureAPersonneListe personnelAjoute) {
598
	public void ajouterStructureAPersonne(Rafraichissable vueARafraichir, String structureId, StructureAPersonneListe personnelAjoute) {
599
		if (personnelAjoute != null && personnelAjoute.size() > 0) {
599
		if (personnelAjoute != null && personnelAjoute.size() > 0) {
600
			for (Iterator<String> it = personnelAjoute.keySet().iterator(); it.hasNext();) {
600
			for (Iterator<String> it = personnelAjoute.keySet().iterator(); it.hasNext();) {
601
				modele.ajouterStructureAPersonne(vueARafraichir, structureId, (StructureAPersonne) personnelAjoute.get(it.next()));
601
				modele.ajouterStructureAPersonne(vueARafraichir, structureId, (StructureAPersonne) personnelAjoute.get(it.next()));
602
			}
602
			}
603
		}
603
		}
604
	}
604
	}
605
	
605
	
606
	public void modifierStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelModifie) {
606
	public void modifierStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelModifie) {
607
		if (personnelModifie != null && personnelModifie.size() > 0) {
607
		if (personnelModifie != null && personnelModifie.size() > 0) {
608
			for (Iterator<String> it = personnelModifie.keySet().iterator(); it.hasNext();) {
608
			for (Iterator<String> it = personnelModifie.keySet().iterator(); it.hasNext();) {
609
				modele.modifierStructureAPersonne(vueARafraichir, (StructureAPersonne) personnelModifie.get(it.next()));
609
				modele.modifierStructureAPersonne(vueARafraichir, (StructureAPersonne) personnelModifie.get(it.next()));
610
			}
610
			}
611
		}
611
		}
612
	}
612
	}
613
	
613
	
614
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelSupprime) {
614
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelSupprime) {
615
		if (personnelSupprime != null && personnelSupprime.size() > 0) {
615
		if (personnelSupprime != null && personnelSupprime.size() > 0) {
616
			String idStructureAPersonneSepareParVirgule = "" ;
616
			String idStructureAPersonneSepareParVirgule = "" ;
617
			Iterator<String> it = personnelSupprime.keySet().iterator();
617
			Iterator<String> it = personnelSupprime.keySet().iterator();
618
			while (it.hasNext()) {
618
			while (it.hasNext()) {
619
				idStructureAPersonneSepareParVirgule += personnelSupprime.get(it.next()).getId();
619
				idStructureAPersonneSepareParVirgule += personnelSupprime.get(it.next()).getId();
620
				idStructureAPersonneSepareParVirgule += (it.hasNext()) ? "," : "";
620
				idStructureAPersonneSepareParVirgule += (it.hasNext()) ? "," : "";
621
			}
621
			}
622
			supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSepareParVirgule);
622
			supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSepareParVirgule);
623
		}
623
		}
624
	}
624
	}
625
	
625
	
626
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, String idStructureAPersonneSeparesParVirgule) {
626
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, String idStructureAPersonneSeparesParVirgule) {
627
		modele.supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSeparesParVirgule);
627
		modele.supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSeparesParVirgule);
628
	}
628
	}
629
	
629
	
630
	public void supprimerStructureAPersonne(final Rafraichissable vueARafraichir, final List<Structure> structuresListe) {
630
	public void supprimerStructureAPersonne(final Rafraichissable vueARafraichir, final List<Structure> structuresListe) {
631
		if (structuresListe.size() != 0) {
631
		if (structuresListe.size() != 0) {
632
			String idStructureSepareParVirgule = "" ;
632
			String idStructureSepareParVirgule = "" ;
633
			Iterator<Structure> it = structuresListe.iterator();
633
			Iterator<Structure> it = structuresListe.iterator();
634
			while (it.hasNext()) {
634
			while (it.hasNext()) {
635
				Structure structure = it.next();
635
				Structure structure = it.next();
636
				idStructureSepareParVirgule += structure.getId();
636
				idStructureSepareParVirgule += structure.getId();
637
				idStructureSepareParVirgule += it.hasNext() ? "," : "";
637
				idStructureSepareParVirgule += it.hasNext() ? "," : "";
638
			}
638
			}
639
			supprimerStructureAPersonne(vueARafraichir, idStructureSepareParVirgule);
639
			supprimerStructureAPersonne(vueARafraichir, idStructureSepareParVirgule);
640
		}
640
		}
641
	}
641
	}
642
	
642
	
643
	//+----------------------------------------------------------------------------------------------------------------+
643
	//+----------------------------------------------------------------------------------------------------------------+
644
	//												GESTION des COLLECTIONS
644
	//												GESTION des COLLECTIONS
645
	//+----------------------------------------------------------------------------------------------------------------+
645
	//+----------------------------------------------------------------------------------------------------------------+
646
	
646
	
647
	public void afficherListeCollections(CollectionListe collectionsACharger) {
647
	public void afficherListeCollections(CollectionListe collectionsACharger) {
648
		if (!(panneauCentre.getContenu() instanceof CollectionVue)) {
648
		if (!(panneauCentre.getContenu() instanceof CollectionVue)) {
649
			panneauCentre.removeAll();
649
			panneauCentre.removeAll();
650
			panneauCentre.add(new CollectionVue(this));
650
			panneauCentre.add(new CollectionVue(this));
651
		}
651
		}
652
		
652
		
653
		panneauCentre.getContenu().rafraichir(collectionsACharger);
653
		panneauCentre.getContenu().rafraichir(collectionsACharger);
654
	}
654
	}
655
	
655
	
656
	public void afficherFormCollection(String collectionId) {
656
	public void afficherFormCollection(String collectionId) {
657
		panneauCentre.removeAll();
657
		panneauCentre.removeAll();
658
		CollectionForm collectionForm = new CollectionForm(this, collectionId);
658
		CollectionForm collectionForm = new CollectionForm(this, collectionId);
659
		panneauCentre.add(collectionForm);
659
		panneauCentre.add(collectionForm);
660
		
660
		
661
		panneauCentre.layout();
661
		panneauCentre.layout();
662
	}
662
	}
663
	
663
	
664
	public void clicListeCollection(Collection collectionCliquee) {
664
	public void clicListeCollection(Collection collectionCliquee) {
665
		panneauCentre.getContenu().rafraichir(collectionCliquee);
665
		panneauCentre.getContenu().rafraichir(collectionCliquee);
666
		if (collectionCliquee != null) {
666
		if (collectionCliquee != null) {
667
			selectionnerCollectionAPersonne(panneauCentre.getContenu(), collectionCliquee.getId(), null);
667
			selectionnerCollectionAPersonne(panneauCentre.getContenu(), collectionCliquee.getId(), null);
668
			selectionnerCollectionAPublication(panneauCentre.getContenu(), collectionCliquee.getId());
668
			selectionnerCollectionAPublication(panneauCentre.getContenu(), collectionCliquee.getId());
669
			selectionnerCollectionACommentaire(panneauCentre.getContenu(), collectionCliquee.getId());
669
			selectionnerCollectionACommentaire(panneauCentre.getContenu(), collectionCliquee.getId());
670
		} 
670
		} 
671
	}
671
	}
672
	
672
	
673
	public void clicAjouterCollection() {
673
	public void clicAjouterCollection() {
674
		afficherFormCollection(null);
674
		afficherFormCollection(null);
675
	}
675
	}
676
 
676
 
677
	public void clicModifierCollection(List<Collection> selection) {
677
	public void clicModifierCollection(List<Collection> selection) {
678
		if (selection.size() == 0) {
678
		if (selection.size() == 0) {
679
			Info.display("Information", "Veuillez sélectionner une collection.");
679
			Info.display("Information", "Veuillez sélectionner une collection.");
680
		} else if (selection.size() > 1) {
680
		} else if (selection.size() > 1) {
681
			Info.display("Information", "Veuillez sélectionner une seule collection à la fois.");
681
			Info.display("Information", "Veuillez sélectionner une seule collection à la fois.");
682
		} else if (selection.size() == 1) {
682
		} else if (selection.size() == 1) {
683
			afficherFormCollection(selection.get(0).getId());
683
			afficherFormCollection(selection.get(0).getId());
684
		} else {
684
		} else {
685
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCollection() du Médiateur.");
685
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCollection() du Médiateur.");
686
		}
686
		}
687
	}
687
	}
688
 
688
 
689
	public void clicSupprimerCollection(CollectionListeVue collectionListeVue, final List<Collection> collectionsASupprimer) {
689
	public void clicSupprimerCollection(CollectionListeVue collectionListeVue, final List<Collection> collectionsASupprimer) {
690
		if (collectionsASupprimer.size() <= 0) {
690
		if (collectionsASupprimer.size() <= 0) {
691
			MessageBox.alert("Attention", "Vous devez sélectionner au moins une collection", null); 
691
			MessageBox.alert("Attention", "Vous devez sélectionner au moins une collection", null); 
692
		} else {
692
		} else {
693
			String message = "Voulez-vous vraiment supprimer ces collections ?";
693
			String message = "Voulez-vous vraiment supprimer ces collections ?";
694
			if (collectionsASupprimer.size() == 1) {
694
			if (collectionsASupprimer.size() == 1) {
695
				message = "Voulez-vous vraiment supprimer cette collection ?";
695
				message = "Voulez-vous vraiment supprimer cette collection ?";
696
			}
696
			}
697
			
697
			
698
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
698
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
699
				public void handleEvent(MessageBoxEvent ce) {  
699
				public void handleEvent(MessageBoxEvent ce) {  
700
					Dialog dialog = (Dialog) ce.getComponent();
700
					Dialog dialog = (Dialog) ce.getComponent();
701
				    Button btn = ce.getButtonClicked();  
701
				    Button btn = ce.getButtonClicked();  
702
				    	   
702
				    	   
703
				    if (btn.getText().equals(dialog.yesText)) {
703
				    if (btn.getText().equals(dialog.yesText)) {
704
				    	supprimerCollection(panneauCentre.getContenu(), collectionsASupprimer);
704
				    	supprimerCollection(panneauCentre.getContenu(), collectionsASupprimer);
705
				    }
705
				    }
706
				}
706
				}
707
			};
707
			};
708
				     
708
				     
709
			MessageBox.confirm("Supprimer une collection", message, listenerSuppression);
709
			MessageBox.confirm("Supprimer une collection", message, listenerSuppression);
710
		}	
710
		}	
711
	}
711
	}
712
 
712
 
713
	public void selectionnerCollection(Rafraichissable vueARafraichir, String collectionId) {
713
	public void selectionnerCollection(Rafraichissable vueARafraichir, String collectionId) {
714
		modele.selectionnerCollection(vueARafraichir, getProjetId(), collectionId);
714
		modele.selectionnerCollection(vueARafraichir, getProjetId(), collectionId);
715
	}
715
	}
716
	
716
	
717
	public void selectionnerCollectionParProjet(Rafraichissable vueARafraichir, String projetId) {
717
	public void selectionnerCollectionParProjet(Rafraichissable vueARafraichir, String projetId) {
718
		modele.selectionnerCollection(vueARafraichir, projetId, null);
718
		modele.selectionnerCollection(vueARafraichir, projetId, null);
719
	}
719
	}
720
	
720
	
721
	public void ajouterCollection(Rafraichissable vueARafraichir, Collection collection) {
721
	public void ajouterCollection(Rafraichissable vueARafraichir, Collection collection) {
722
		modele.ajouterCollection(vueARafraichir, collection);
722
		modele.ajouterCollection(vueARafraichir, collection);
723
	}
723
	}
724
	
724
	
725
	public void modifierCollection(Rafraichissable vueARafraichir, Collection collection) {
725
	public void modifierCollection(Rafraichissable vueARafraichir, Collection collection) {
726
		modele.modifierCollection(vueARafraichir, collection);
726
		modele.modifierCollection(vueARafraichir, collection);
727
	}
727
	}
728
	
728
	
729
	public void supprimerCollection(Rafraichissable vueARafraichir, List<Collection> collectionsListe) {
729
	public void supprimerCollection(Rafraichissable vueARafraichir, List<Collection> collectionsListe) {
730
		if (collectionsListe != null && collectionsListe.size() > 0) {
730
		if (collectionsListe != null && collectionsListe.size() > 0) {
731
			String idCollectionSeparesParVirgule = "" ;
731
			String idCollectionSeparesParVirgule = "" ;
732
			Iterator<Collection> it = collectionsListe.iterator();
732
			Iterator<Collection> it = collectionsListe.iterator();
733
			while (it.hasNext()) {
733
			while (it.hasNext()) {
734
				idCollectionSeparesParVirgule += it.next().getId();
734
				idCollectionSeparesParVirgule += it.next().getId();
735
				if (it.hasNext()) {
735
				if (it.hasNext()) {
736
					idCollectionSeparesParVirgule += ",";
736
					idCollectionSeparesParVirgule += ",";
737
				}
737
				}
738
			}
738
			}
739
			modele.supprimerCollection(vueARafraichir, idCollectionSeparesParVirgule);
739
			modele.supprimerCollection(vueARafraichir, idCollectionSeparesParVirgule);
740
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionSeparesParVirgule);
740
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionSeparesParVirgule);
741
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionSeparesParVirgule);
741
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionSeparesParVirgule);
742
			//modele.supprimerCollectionACommentaire(vueARafraichir, idCollectionSeparesParVirgule);
742
			//modele.supprimerCollectionACommentaire(vueARafraichir, idCollectionSeparesParVirgule);
743
		}
743
		}
744
		
744
		
745
	}
745
	}
746
	
746
	
747
	//+----------------------------------------------------------------------------------------------------------------+
747
	//+----------------------------------------------------------------------------------------------------------------+
748
	// GESTION de la relation COLLECTION A PERSONNE
748
	// GESTION de la relation COLLECTION A PERSONNE
749
	
749
	
750
	public void selectionnerCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, String roleId) {
750
	public void selectionnerCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, String roleId) {
751
		modele.selectionnerCollectionAPersonne(vueARafraichir, collectionId, roleId);
751
		modele.selectionnerCollectionAPersonne(vueARafraichir, collectionId, roleId);
752
	}
752
	}
753
	
753
	
754
	public void ajouterCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, CollectionAPersonneListe personnesAjoutees) {
754
	public void ajouterCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, CollectionAPersonneListe personnesAjoutees) {
755
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
755
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
756
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
756
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
757
				modele.ajouterCollectionAPersonne(vueARafraichir, collectionId, (CollectionAPersonne) personnesAjoutees.get(it.next()));
757
				modele.ajouterCollectionAPersonne(vueARafraichir, collectionId, (CollectionAPersonne) personnesAjoutees.get(it.next()));
758
			}
758
			}
759
		}
759
		}
760
	}
760
	}
761
	
761
	
762
	public void modifierCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesModifiees) {
762
	public void modifierCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesModifiees) {
763
		if (personnesModifiees != null && personnesModifiees.size() > 0) {
763
		if (personnesModifiees != null && personnesModifiees.size() > 0) {
764
			for (Iterator<String> it = personnesModifiees.keySet().iterator(); it.hasNext();) {
764
			for (Iterator<String> it = personnesModifiees.keySet().iterator(); it.hasNext();) {
765
				modele.modifierCollectionAPersonne(vueARafraichir, (CollectionAPersonne) personnesModifiees.get(it.next()));
765
				modele.modifierCollectionAPersonne(vueARafraichir, (CollectionAPersonne) personnesModifiees.get(it.next()));
766
			}
766
			}
767
		}
767
		}
768
	}
768
	}
769
	
769
	
770
	public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesSupprimees) {
770
	public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesSupprimees) {
771
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
771
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
772
			String idCollectionAPersonneSeparesParVirgule = "" ;
772
			String idCollectionAPersonneSeparesParVirgule = "" ;
773
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
773
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
774
				idCollectionAPersonneSeparesParVirgule += personnesSupprimees.get(it.next()).getId();
774
				idCollectionAPersonneSeparesParVirgule += personnesSupprimees.get(it.next()).getId();
775
				if (it.hasNext()) {
775
				if (it.hasNext()) {
776
					idCollectionAPersonneSeparesParVirgule += ",";
776
					idCollectionAPersonneSeparesParVirgule += ",";
777
				}
777
				}
778
			}
778
			}
779
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionAPersonneSeparesParVirgule);
779
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionAPersonneSeparesParVirgule);
780
		}
780
		}
781
	}
781
	}
782
	
782
	
783
	//+----------------------------------------------------------------------------------------------------------------+
783
	//+----------------------------------------------------------------------------------------------------------------+
784
	// GESTION de la relation COLLECTION A PUBLICATION
784
	// GESTION de la relation COLLECTION A PUBLICATION
785
	
785
	
786
	public void selectionnerCollectionAPublication(Rafraichissable vueARafraichir, String collectionId) {
786
	public void selectionnerCollectionAPublication(Rafraichissable vueARafraichir, String collectionId) {
787
		modele.selectionnerCollectionAPublication(vueARafraichir, collectionId);
787
		modele.selectionnerCollectionAPublication(vueARafraichir, collectionId);
788
	}
788
	}
789
	
789
	
790
	public void ajouterCollectionAPublication(Rafraichissable vueARafraichir, String collectionId, CollectionAPublicationListe publicationsAjoutees) {
790
	public void ajouterCollectionAPublication(Rafraichissable vueARafraichir, String collectionId, CollectionAPublicationListe publicationsAjoutees) {
791
		if (publicationsAjoutees != null && publicationsAjoutees.size() > 0) {
791
		if (publicationsAjoutees != null && publicationsAjoutees.size() > 0) {
792
			for (Iterator<String> it = publicationsAjoutees.keySet().iterator(); it.hasNext();) {
792
			for (Iterator<String> it = publicationsAjoutees.keySet().iterator(); it.hasNext();) {
793
				modele.ajouterCollectionAPublication(vueARafraichir, collectionId, (CollectionAPublication) publicationsAjoutees.get(it.next()));
793
				modele.ajouterCollectionAPublication(vueARafraichir, collectionId, (CollectionAPublication) publicationsAjoutees.get(it.next()));
794
			}
794
			}
795
		}
795
		}
796
	}
796
	}
797
	
797
	
798
	public void modifierCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsModifiees) {
798
	public void modifierCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsModifiees) {
799
		if (publicationsModifiees != null && publicationsModifiees.size() > 0) {
799
		if (publicationsModifiees != null && publicationsModifiees.size() > 0) {
800
			for (Iterator<String> it = publicationsModifiees.keySet().iterator(); it.hasNext();) {
800
			for (Iterator<String> it = publicationsModifiees.keySet().iterator(); it.hasNext();) {
801
				modele.modifierCollectionAPublication(vueARafraichir, (CollectionAPublication) publicationsModifiees.get(it.next()));
801
				modele.modifierCollectionAPublication(vueARafraichir, (CollectionAPublication) publicationsModifiees.get(it.next()));
802
			}
802
			}
803
		}
803
		}
804
	}
804
	}
805
	
805
	
806
	public void supprimerCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsSupprimees) {
806
	public void supprimerCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsSupprimees) {
807
		if (publicationsSupprimees != null && publicationsSupprimees.size() > 0) {
807
		if (publicationsSupprimees != null && publicationsSupprimees.size() > 0) {
808
			String idCollectionAPublicationSeparesParVirgule = "" ;
808
			String idCollectionAPublicationSeparesParVirgule = "" ;
809
			for (Iterator<String> it = publicationsSupprimees.keySet().iterator(); it.hasNext();) {
809
			for (Iterator<String> it = publicationsSupprimees.keySet().iterator(); it.hasNext();) {
810
				idCollectionAPublicationSeparesParVirgule += publicationsSupprimees.get(it.next()).getId();
810
				idCollectionAPublicationSeparesParVirgule += publicationsSupprimees.get(it.next()).getId();
811
				if (it.hasNext()) {
811
				if (it.hasNext()) {
812
					idCollectionAPublicationSeparesParVirgule += ",";
812
					idCollectionAPublicationSeparesParVirgule += ",";
813
				}
813
				}
814
			}
814
			}
815
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionAPublicationSeparesParVirgule);
815
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionAPublicationSeparesParVirgule);
816
		}
816
		}
817
	}
817
	}
818
 
818
 
819
	//+----------------------------------------------------------------------------------------------------------------+
819
	//+----------------------------------------------------------------------------------------------------------------+
820
	// GESTION de la relation COLLECTION A COMMENTAIRE
820
	// GESTION de la relation COLLECTION A COMMENTAIRE
821
	
821
	
822
	public void selectionnerCollectionACommentaire(Rafraichissable vueARafraichir, String collectionId) {
822
	public void selectionnerCollectionACommentaire(Rafraichissable vueARafraichir, String collectionId) {
823
		modele.selectionnerCollectionACommentaire(vueARafraichir, collectionId);
823
		modele.selectionnerCollectionACommentaire(vueARafraichir, collectionId);
824
	}
824
	}
825
	
825
	
826
	public void ajouterCollectionACommentaire(Rafraichissable vueARafraichir, String collectionId, CollectionACommentaireListe commentairesAjoutees) {
826
	public void ajouterCollectionACommentaire(Rafraichissable vueARafraichir, String collectionId, CollectionACommentaireListe commentairesAjoutees) {
827
		if (commentairesAjoutees != null && commentairesAjoutees.size() > 0) {
827
		if (commentairesAjoutees != null && commentairesAjoutees.size() > 0) {
828
			for (Iterator<String> it = commentairesAjoutees.keySet().iterator(); it.hasNext();) {
828
			for (Iterator<String> it = commentairesAjoutees.keySet().iterator(); it.hasNext();) {
829
				modele.ajouterCollectionACommentaire(vueARafraichir, collectionId, (CollectionACommentaire) commentairesAjoutees.get(it.next()));
829
				modele.ajouterCollectionACommentaire(vueARafraichir, collectionId, (CollectionACommentaire) commentairesAjoutees.get(it.next()));
830
			}
830
			}
831
		}
831
		}
832
	}
832
	}
833
	
833
	
834
	public void modifierCollectionACommentaire(Rafraichissable vueARafraichir, CollectionACommentaireListe commentairesModifiees) {
834
	public void modifierCollectionACommentaire(Rafraichissable vueARafraichir, CollectionACommentaireListe commentairesModifiees) {
835
		if (commentairesModifiees != null && commentairesModifiees.size() > 0) {
835
		if (commentairesModifiees != null && commentairesModifiees.size() > 0) {
836
			for (Iterator<String> it = commentairesModifiees.keySet().iterator(); it.hasNext();) {
836
			for (Iterator<String> it = commentairesModifiees.keySet().iterator(); it.hasNext();) {
837
				modele.modifierCollectionACommentaire(vueARafraichir, (CollectionACommentaire) commentairesModifiees.get(it.next()));
837
				modele.modifierCollectionACommentaire(vueARafraichir, (CollectionACommentaire) commentairesModifiees.get(it.next()));
838
			}
838
			}
839
		}
839
		}
840
	}
840
	}
841
	
841
	
842
	public void supprimerCollectionACommentaire(Rafraichissable vueARafraichir, CollectionACommentaireListe commentairesSupprimees) {
842
	public void supprimerCollectionACommentaire(Rafraichissable vueARafraichir, CollectionACommentaireListe commentairesSupprimees) {
843
		if (commentairesSupprimees != null && commentairesSupprimees.size() > 0) {
843
		if (commentairesSupprimees != null && commentairesSupprimees.size() > 0) {
844
			String idCollectionACommentaireSeparesParVirgule = "" ;
844
			String idCollectionACommentaireSeparesParVirgule = "" ;
845
			for (Iterator<String> it = commentairesSupprimees.keySet().iterator(); it.hasNext();) {
845
			for (Iterator<String> it = commentairesSupprimees.keySet().iterator(); it.hasNext();) {
846
				idCollectionACommentaireSeparesParVirgule += commentairesSupprimees.get(it.next()).getId();
846
				idCollectionACommentaireSeparesParVirgule += commentairesSupprimees.get(it.next()).getId();
847
				if (it.hasNext()) {
847
				if (it.hasNext()) {
848
					idCollectionACommentaireSeparesParVirgule += ",";
848
					idCollectionACommentaireSeparesParVirgule += ",";
849
				}
849
				}
850
			}
850
			}
851
			modele.supprimerCollectionACommentaire(vueARafraichir, idCollectionACommentaireSeparesParVirgule, CollectionACommentaireAsyncDao.SUPPRESSION_PAR_COLLECTION);
851
			modele.supprimerCollectionACommentaire(vueARafraichir, idCollectionACommentaireSeparesParVirgule, CollectionACommentaireAsyncDao.SUPPRESSION_PAR_COLLECTION);
852
		}
852
		}
853
	}
853
	}
854
	//+----------------------------------------------------------------------------------------------------------------+
854
	//+----------------------------------------------------------------------------------------------------------------+
855
	//												GESTION DES PERSONNES
855
	//												GESTION DES PERSONNES
856
	//+----------------------------------------------------------------------------------------------------------------+
856
	//+----------------------------------------------------------------------------------------------------------------+
857
 
857
 
858
	public void afficherListePersonnes(PersonneListe personnesACharger)	{
858
	public void afficherListePersonnes(PersonneListe personnesACharger)	{
859
		if (!(panneauCentre.getContenu() instanceof PersonneVue))	{
859
		if (!(panneauCentre.getContenu() instanceof PersonneVue))	{
860
			panneauCentre.removeAll();
860
			panneauCentre.removeAll();
861
			panneauCentre.add(new PersonneVue(this));
861
			panneauCentre.add(new PersonneVue(this));
862
			panneauCentre.setId(ComposantId.PANNEAU_PERSONNE_LISTES);
862
			panneauCentre.setId(ComposantId.PANNEAU_PERSONNE_LISTES);
863
		}	
863
		}	
864
		
864
		
865
		panneauCentre.getContenu().rafraichir(personnesACharger);
865
		panneauCentre.getContenu().rafraichir(personnesACharger);
866
	}
866
	}
867
	
867
	
868
	public void afficherFormPersonne(String personneId)	{
868
	public void afficherFormPersonne(String personneId)	{
869
		panneauCentre.removeAll();
869
		panneauCentre.removeAll();
870
		PersonneForm personneForm = new PersonneForm(this, personneId);
870
		PersonneForm personneForm = new PersonneForm(this, personneId);
871
		panneauCentre.add(personneForm);
871
		panneauCentre.add(personneForm);
872
		
872
		
873
		panneauCentre.layout();
873
		panneauCentre.layout();
874
	}
874
	}
875
 
875
 
876
	public void clicListePersonne(Personne personne)	{
876
	public void clicListePersonne(Personne personne)	{
877
		panneauCentre.getContenu().rafraichir(personne);
877
		panneauCentre.getContenu().rafraichir(personne);
878
	}
878
	}
879
 
879
 
880
	public void clicAjouterPersonne()	{
880
	public void clicAjouterPersonne()	{
881
		afficherFormPersonne(null);
881
		afficherFormPersonne(null);
882
	}
882
	}
883
	
883
	
884
	public void clicModifierPersonne(List<Personne> selection)	{
884
	public void clicModifierPersonne(List<Personne> selection)	{
885
		if (selection.size() == 0) {
885
		if (selection.size() == 0) {
886
			Info.display("Information", "Veuillez sélectionner une personne.");
886
			Info.display("Information", "Veuillez sélectionner une personne.");
887
		} else if (selection.size() > 1) {
887
		} else if (selection.size() > 1) {
888
			Info.display("Information", "Veuillez sélectionner une seule personne à la fois.");
888
			Info.display("Information", "Veuillez sélectionner une seule personne à la fois.");
889
		} else if (selection.size() == 1) {
889
		} else if (selection.size() == 1) {
890
			afficherFormPersonne(selection.get(0).getId());
890
			afficherFormPersonne(selection.get(0).getId());
891
		} else {
891
		} else {
892
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
892
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
893
		}			
893
		}			
894
	}
894
	}
895
	
895
	
896
	
896
	
897
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
897
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
898
		//Empecher suppression utilisateur
898
		//Empecher suppression utilisateur
899
		for (int i=0; i < personneSelection.size(); i++)	{
899
		for (int i=0; i < personneSelection.size(); i++)	{
900
			Personne courante = personneSelection.get(i);
900
			Personne courante = personneSelection.get(i);
901
			if (courante.getId().equals(getUtilisateurId()))	{
901
			if (courante.getId().equals(getUtilisateurId()))	{
902
				Info.display("Information", "Vous ne pouvez pas supprimer votre compte");
902
				Info.display("Information", "Vous ne pouvez pas supprimer votre compte");
903
				personneSelection.remove(courante);
903
				personneSelection.remove(courante);
904
			}
904
			}
905
		}
905
		}
906
		
906
		
907
		if (personneSelection.size() == 0) {
907
		if (personneSelection.size() == 0) {
908
			Info.display("Information", "Veuillez sélectionner une personne.");
908
			Info.display("Information", "Veuillez sélectionner une personne.");
909
		} else if(personneSelection.size() > 0) {
909
		} else if(personneSelection.size() > 0) {
910
			String message = "Êtes vous sur de vouloir supprimer les personnes sélectionnées ?";
910
			String message = "Êtes vous sur de vouloir supprimer les personnes sélectionnées ?";
911
			if (personneSelection.size() == 1) {
911
			if (personneSelection.size() == 1) {
912
				message = "Êtes vous sur de vouloir supprimer la personne sélectionnée ?";
912
				message = "Êtes vous sur de vouloir supprimer la personne sélectionnée ?";
913
			}
913
			}
914
			
914
			
915
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
915
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
916
				public void handleEvent(MessageBoxEvent ce) {
916
				public void handleEvent(MessageBoxEvent ce) {
917
					Dialog dialog = (Dialog) ce.getComponent();
917
					Dialog dialog = (Dialog) ce.getComponent();
918
					Button btn = ce.getButtonClicked();
918
					Button btn = ce.getButtonClicked();
919
 
919
 
920
					if (btn.getText().equals(dialog.yesText)) {
920
					if (btn.getText().equals(dialog.yesText)) {
921
						String idPersonneSepareParVirgule = "" ;
921
						String idPersonneSepareParVirgule = "" ;
922
						Iterator<Personne> itPersonne = personneSelection.iterator();
922
						Iterator<Personne> itPersonne = personneSelection.iterator();
923
						while (itPersonne.hasNext()) {
923
						while (itPersonne.hasNext()) {
924
							Personne personneCourante = itPersonne.next();
924
							Personne personneCourante = itPersonne.next();
925
							idPersonneSepareParVirgule += personneCourante.getId();
925
							idPersonneSepareParVirgule += personneCourante.getId();
926
							idPersonneSepareParVirgule +=",";
926
							idPersonneSepareParVirgule +=",";
927
						}
927
						}
928
						modele.supprimerPersonne(vue, idPersonneSepareParVirgule);  
928
						modele.supprimerPersonne(vue, idPersonneSepareParVirgule);  
929
					}
929
					}
930
				}
930
				}
931
			};
931
			};
932
			
932
			
933
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
933
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
934
		} else {
934
		} else {
935
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
935
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
936
		}
936
		}
937
	}
937
	}
938
 
938
 
939
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId)	{
939
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId)	{
940
		int nbElements = Integer.valueOf(((Dictionary) Dictionary.getDictionary("configuration")).get("nbElementsPage")); 
940
		int nbElements = Integer.valueOf(((Dictionary) Dictionary.getDictionary("configuration")).get("nbElementsPage")); 
941
		selectionnerPersonne(vueARafraichir, personne, projetId, 0, nbElements);
941
		selectionnerPersonne(vueARafraichir, personne, projetId, 0, nbElements);
942
	}
942
	}
943
	
943
	
944
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId, int start, int nbElements)	{
944
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId, int start, int nbElements)	{
945
		String personneId = null;
945
		String personneId = null;
946
		if (personne != null)	{
946
		if (personne != null)	{
947
			personneId = personne.getId();
947
			personneId = personne.getId();
948
		}
948
		}
949
		modele.selectionnerPersonne(vueARafraichir, personneId, projetId, null, start, nbElements);
949
		modele.selectionnerPersonne(vueARafraichir, personneId, projetId, null, start, nbElements);
950
	}
950
	}
951
	
951
	
952
	public void selectionnerPersonneParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
952
	public void selectionnerPersonneParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
953
		modele.selectionnerPersonne(vueARafraichir, null, projetId, nomComplet, 0, -1);		
953
		modele.selectionnerPersonne(vueARafraichir, null, projetId, nomComplet, 0, -1);		
954
	}
954
	}
955
	
955
	
956
	public void selectionnerPersonneParProjet(Rafraichissable vueARafraichir, String projetId) {
956
	public void selectionnerPersonneParProjet(Rafraichissable vueARafraichir, String projetId) {
957
		modele.selectionnerPersonne(vueARafraichir, null, projetId, null, 0, -1);		
957
		modele.selectionnerPersonne(vueARafraichir, null, projetId, null, 0, -1);		
958
	}
958
	}
959
	
959
	
960
	public void enregistrerPersonne(Rafraichissable vue, Personne personne){
960
	public void enregistrerPersonne(Rafraichissable vue, Personne personne){
961
		if (personne.getId() != null && !personne.getId().trim().equals("")) {	
961
		if (personne.getId() != null && !personne.getId().trim().equals("")) {	
962
			modele.modifierPersonne(vue, personne);
962
			modele.modifierPersonne(vue, personne);
963
		}	else {
963
		}	else {
964
			modele.ajouterPersonne(vue, personne);
964
			modele.ajouterPersonne(vue, personne);
965
		}
965
		}
966
	}
966
	}
967
	
967
	
968
	//+----------------------------------------------------------------------------------------------------------------+
968
	//+----------------------------------------------------------------------------------------------------------------+
969
	//												GESTION DES PUBLICATIONS
969
	//												GESTION DES PUBLICATIONS
970
	//+----------------------------------------------------------------------------------------------------------------+
970
	//+----------------------------------------------------------------------------------------------------------------+
971
 
971
 
972
	public void afficherListePublication(PublicationListe nouvelleDonnees) {
972
	public void afficherListePublication(PublicationListe nouvelleDonnees) {
973
		if (!(panneauCentre.getContenu() instanceof PublicationVue))	{
973
		if (!(panneauCentre.getContenu() instanceof PublicationVue))	{
974
			panneauCentre.removeAll();
974
			panneauCentre.removeAll();
975
			panneauCentre.add(new PublicationVue(this));
975
			panneauCentre.add(new PublicationVue(this));
976
		}	
976
		}	
977
		
977
		
978
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
978
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
979
	}
979
	}
980
	
980
	
981
	public void afficherFormPublication(String publicationId) {
981
	public void afficherFormPublication(String publicationId) {
982
		panneauCentre.removeAll();
982
		panneauCentre.removeAll();
983
		PublicationForm publicationForm = new PublicationForm(this, publicationId);
983
		PublicationForm publicationForm = new PublicationForm(this, publicationId);
984
		panneauCentre.add(publicationForm);
984
		panneauCentre.add(publicationForm);
985
		
985
		
986
		panneauCentre.layout();
986
		panneauCentre.layout();
987
	}
987
	}
988
	
988
	
989
	public void clicListePublication(Publication publication) {
989
	public void clicListePublication(Publication publication) {
990
		if (publication != null) {
990
		if (publication != null) {
991
			panneauCentre.getContenu().rafraichir(publication);	
991
			panneauCentre.getContenu().rafraichir(publication);	
992
		}
992
		}
993
	}
993
	}
994
 
994
 
995
	public void clicAjouterPublication() {
995
	public void clicAjouterPublication() {
996
		afficherFormPublication(null);
996
		afficherFormPublication(null);
997
	}
997
	}
998
	
998
	
999
	public void clicModifierPublication(List<Publication> selection) {
999
	public void clicModifierPublication(List<Publication> selection) {
1000
		if (selection.size() == 0) {
1000
		if (selection.size() == 0) {
1001
			Info.display("Information", "Veuillez sélectionner une publication.");
1001
			Info.display("Information", "Veuillez sélectionner une publication.");
1002
		} else if (selection.size() > 1) {
1002
		} else if (selection.size() > 1) {
1003
			Info.display("Information", "Veuillez sélectionner une seule publication à la fois.");
1003
			Info.display("Information", "Veuillez sélectionner une seule publication à la fois.");
1004
		} else if (selection.size() == 1) {
1004
		} else if (selection.size() == 1) {
1005
			afficherFormPublication(selection.get(0).getId());
1005
			afficherFormPublication(selection.get(0).getId());
1006
		} else {
1006
		} else {
1007
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
1007
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
1008
		}
1008
		}
1009
	}
1009
	}
1010
	
1010
	
1011
	public void clicSupprimerPublication(final List<Publication> publicationListe) {
1011
	public void clicSupprimerPublication(final List<Publication> publicationListe) {
1012
		if (publicationListe.size() <= 0) {
1012
		if (publicationListe.size() <= 0) {
1013
			MessageBox.alert("Attention", "Vous devez sélectionner une publication", null); 
1013
			MessageBox.alert("Attention", "Vous devez sélectionner une publication", null); 
1014
		} else {
1014
		} else {
1015
			String message = "Voulez-vous vraiment supprimer ces publications ?";
1015
			String message = "Voulez-vous vraiment supprimer ces publications ?";
1016
			if (publicationListe.size() == 1) {
1016
			if (publicationListe.size() == 1) {
1017
				message = "Voulez-vous vraiment supprimer cette publication ?";
1017
				message = "Voulez-vous vraiment supprimer cette publication ?";
1018
			}
1018
			}
1019
			
1019
			
1020
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
1020
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
1021
				public void handleEvent(MessageBoxEvent ce) {  
1021
				public void handleEvent(MessageBoxEvent ce) {  
1022
					Dialog dialog = (Dialog) ce.getComponent();
1022
					Dialog dialog = (Dialog) ce.getComponent();
1023
				    Button btn = ce.getButtonClicked();  
1023
				    Button btn = ce.getButtonClicked();  
1024
				    	   
1024
				    	   
1025
				    if (btn.getText().equals(dialog.yesText)) {
1025
				    if (btn.getText().equals(dialog.yesText)) {
1026
				    	supprimerPublication(panneauCentre.getContenu(), publicationListe);
1026
				    	supprimerPublication(panneauCentre.getContenu(), publicationListe);
1027
				    }
1027
				    }
1028
				}
1028
				}
1029
			};
1029
			};
1030
				     
1030
				     
1031
			MessageBox.confirm("Supprimer une publication", message, listenerSuppression);
1031
			MessageBox.confirm("Supprimer une publication", message, listenerSuppression);
1032
		}
1032
		}
1033
	}
1033
	}
1034
	
1034
	
1035
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId) {
1035
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId) {
1036
		modele.selectionnerPublication(vueARafraichir, publicationId, getProjetId(), null);
1036
		modele.selectionnerPublication(vueARafraichir, publicationId, getProjetId(), null);
1037
	}
1037
	}
1038
	
1038
	
1039
	public void selectionnerPublicationParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
1039
	public void selectionnerPublicationParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
1040
		modele.selectionnerPublication(vueARafraichir, null, projetId, nomComplet);		
1040
		modele.selectionnerPublication(vueARafraichir, null, projetId, nomComplet);		
1041
	}
1041
	}
1042
	
1042
	
1043
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication) {
1043
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication) {
1044
		modele.ajouterPublication(vueARafraichir, publication);
1044
		modele.ajouterPublication(vueARafraichir, publication);
1045
	}
1045
	}
1046
	
1046
	
1047
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
1047
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
1048
		modele.modifierPublication(vueARafraichir, publication);
1048
		modele.modifierPublication(vueARafraichir, publication);
1049
	}
1049
	}
1050
	
1050
	
1051
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
1051
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
1052
		if (publicationsListe != null && publicationsListe.size() > 0) {
1052
		if (publicationsListe != null && publicationsListe.size() > 0) {
1053
			String idPublicationSeparesParVirgule = "" ;
1053
			String idPublicationSeparesParVirgule = "" ;
1054
			Iterator<Publication> it = publicationsListe.iterator();
1054
			Iterator<Publication> it = publicationsListe.iterator();
1055
			while (it.hasNext()) {
1055
			while (it.hasNext()) {
1056
				idPublicationSeparesParVirgule += it.next().getId();
1056
				idPublicationSeparesParVirgule += it.next().getId();
1057
				if (it.hasNext()) {
1057
				if (it.hasNext()) {
1058
					idPublicationSeparesParVirgule += ",";
1058
					idPublicationSeparesParVirgule += ",";
1059
				}
1059
				}
1060
			}
1060
			}
1061
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
1061
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
1062
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1062
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1063
		}
1063
		}
1064
	}
1064
	}
1065
 
1065
 
1066
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
1066
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
1067
		selectionnerStructureParProjet(vueARafraichir, null);
1067
		selectionnerStructureParProjet(vueARafraichir, null);
1068
	}
1068
	}
1069
 
1069
 
1070
	public void clicObtenirListeAuteurs(Rafraichissable vueARafraichir) {
1070
	public void clicObtenirListeAuteurs(Rafraichissable vueARafraichir) {
1071
		selectionnerPersonneParProjet(vueARafraichir, null);
1071
		selectionnerPersonneParProjet(vueARafraichir, null);
1072
	}
1072
	}
1073
	
1073
	
1074
	//+----------------------------------------------------------------------------------------------------------------+
1074
	//+----------------------------------------------------------------------------------------------------------------+
1075
	// GESTION de la relation PUBLICATION A PERSONNE
1075
	// GESTION de la relation PUBLICATION A PERSONNE
1076
 
1076
 
1077
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
1077
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
1078
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
1078
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
1079
	}
1079
	}
1080
	
1080
	
1081
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List roleId) {
1081
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List roleId) {
1082
		String roleIds = "";
1082
		String roleIds = "";
1083
		Iterator<Valeur> itRole = roleId.iterator();
1083
		Iterator<Valeur> itRole = roleId.iterator();
1084
		while (itRole.hasNext())	{
1084
		while (itRole.hasNext())	{
1085
			roleIds+= itRole.next().getId();
1085
			roleIds+= itRole.next().getId();
1086
			if (itRole.hasNext())	{
1086
			if (itRole.hasNext())	{
1087
				roleIds+=",";
1087
				roleIds+=",";
1088
			}
1088
			}
1089
		}
1089
		}
1090
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleIds);
1090
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleIds);
1091
	}
1091
	}
1092
	
1092
	
1093
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
1093
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
1094
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
1094
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
1095
			String idPublicationAPersonneSepareParVirgule = "" ;
1095
			String idPublicationAPersonneSepareParVirgule = "" ;
1096
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1096
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1097
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1097
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1098
				if (it.hasNext()) {
1098
				if (it.hasNext()) {
1099
					idPublicationAPersonneSepareParVirgule += ",";
1099
					idPublicationAPersonneSepareParVirgule += ",";
1100
				}
1100
				}
1101
			}
1101
			}
1102
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
1102
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
1103
		}
1103
		}
1104
	}
1104
	}
1105
	
1105
	
1106
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1106
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1107
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1107
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1108
			String idPublicationAPersonneSepareParVirgule = "" ;
1108
			String idPublicationAPersonneSepareParVirgule = "" ;
1109
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1109
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1110
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1110
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1111
				if (it.hasNext()) {
1111
				if (it.hasNext()) {
1112
					idPublicationAPersonneSepareParVirgule += ",";
1112
					idPublicationAPersonneSepareParVirgule += ",";
1113
				}
1113
				}
1114
			}
1114
			}
1115
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
1115
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
1116
		}
1116
		}
1117
	}
1117
	}
1118
	
1118
	
1119
	//Lier plusieurs publication à une personne
1119
	//Lier plusieurs publication à une personne
1120
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe listePublications, String personneId, String roleId) {
1120
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe listePublications, String personneId, String roleId) {
1121
		if (listePublications!=null && listePublications.size()>0)	{
1121
		if (listePublications!=null && listePublications.size()>0)	{
1122
			String idsPubli = "";
1122
			String idsPubli = "";
1123
			String rolesIds = "";
1123
			String rolesIds = "";
1124
			for (Iterator<String> it = listePublications.keySet().iterator(); it.hasNext();) {
1124
			for (Iterator<String> it = listePublications.keySet().iterator(); it.hasNext();) {
1125
				PublicationAPersonne publi = listePublications.get(it.next());
1125
				PublicationAPersonne publi = listePublications.get(it.next());
1126
				idsPubli += publi.getId();
1126
				idsPubli += publi.getId();
1127
				rolesIds += publi.getRole();
1127
				rolesIds += publi.getRole();
1128
				if (it.hasNext()) {
1128
				if (it.hasNext()) {
1129
					idsPubli += ",";
1129
					idsPubli += ",";
1130
					rolesIds += ",";
1130
					rolesIds += ",";
1131
				}
1131
				}
1132
			}			
1132
			}			
1133
			modele.ajouterPublicationAPersonne(vueARafraichir, idsPubli, personneId, rolesIds);
1133
			modele.ajouterPublicationAPersonne(vueARafraichir, idsPubli, personneId, rolesIds);
1134
		}
1134
		}
1135
	}
1135
	}
1136
	
1136
	
1137
	//+----------------------------------------------------------------------------------------------------------------+
1137
	//+----------------------------------------------------------------------------------------------------------------+
1138
	//												GESTION DES COMMENTAIRES
1138
	//												GESTION DES COMMENTAIRES
1139
	//+----------------------------------------------------------------------------------------------------------------+
1139
	//+----------------------------------------------------------------------------------------------------------------+
1140
 
1140
 
1141
	public void afficherListeCommentaire(CommentaireListe nouvelleDonnees) {
1141
	public void afficherListeCommentaire(CommentaireListe nouvelleDonnees) {
1142
		if (!(panneauCentre.getContenu() instanceof CommentaireVue)) {
1142
		if (!(panneauCentre.getContenu() instanceof CommentaireVue)) {
1143
			panneauCentre.removeAll();
1143
			panneauCentre.removeAll();
1144
			panneauCentre.add(new CommentaireVue(this));
1144
			panneauCentre.add(new CommentaireVue(this));
1145
		}	
1145
		}	
1146
		
1146
		
1147
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
1147
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
1148
	}
1148
	}
1149
	
1149
	
1150
	public void afficherFormCommentaire(String commentaireId) {
1150
	public void afficherFormCommentaire(String commentaireId) {
1151
		panneauCentre.removeAll();
1151
		panneauCentre.removeAll();
1152
		CommentaireForm commentaireForm = new CommentaireForm(this, commentaireId);
1152
		CommentaireForm commentaireForm = new CommentaireForm(this, commentaireId);
1153
		panneauCentre.add(commentaireForm);
1153
		panneauCentre.add(commentaireForm);
1154
		
1154
		
1155
		panneauCentre.layout();
1155
		panneauCentre.layout();
1156
	}
1156
	}
1157
	
1157
	
1158
	public void clicListeCommentaire(Commentaire commentaire) {
1158
	public void clicListeCommentaire(Commentaire commentaire) {
1159
		if (commentaire != null) {
1159
		if (commentaire != null) {
1160
			panneauCentre.getContenu().rafraichir(commentaire);	
1160
			panneauCentre.getContenu().rafraichir(commentaire);	
1161
		}
1161
		}
1162
	}
1162
	}
1163
 
1163
 
1164
	public void clicAjouterCommentaire() {
1164
	public void clicAjouterCommentaire() {
1165
		afficherFormCommentaire(null);
1165
		afficherFormCommentaire(null);
1166
	}
1166
	}
1167
	
1167
	
1168
	public void clicModifierCommentaire(List<Commentaire> selection) {
1168
	public void clicModifierCommentaire(List<Commentaire> selection) {
1169
		if (selection.size() == 0) {
1169
		if (selection.size() == 0) {
1170
			Info.display("Information", "Veuillez sélectionner un commentaire.");
1170
			Info.display("Information", "Veuillez sélectionner un commentaire.");
1171
		} else if (selection.size() > 1) {
1171
		} else if (selection.size() > 1) {
1172
			Info.display("Information", "Veuillez sélectionner un seul commentaire à la fois.");
1172
			Info.display("Information", "Veuillez sélectionner un seul commentaire à la fois.");
1173
		} else if (selection.size() == 1) {
1173
		} else if (selection.size() == 1) {
1174
			afficherFormCommentaire(selection.get(0).getId());
1174
			afficherFormCommentaire(selection.get(0).getId());
1175
		} else {
1175
		} else {
1176
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCommentaire() du Médiateur.");
1176
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCommentaire() du Médiateur.");
1177
		}
1177
		}
1178
	}
1178
	}
1179
	
1179
	
1180
	public void clicSupprimerCommentaire(final List<Commentaire> commentaireListe) {
1180
	public void clicSupprimerCommentaire(final List<Commentaire> commentaireListe) {
1181
		if (commentaireListe.size() <= 0) {
1181
		if (commentaireListe.size() <= 0) {
1182
			MessageBox.alert("Attention", "Vous devez sélectionner un commentaire", null); 
1182
			MessageBox.alert("Attention", "Vous devez sélectionner un commentaire", null); 
1183
		} else {
1183
		} else {
1184
			String message = "Voulez-vous vraiment supprimer ces commentaires ?";
1184
			String message = "Voulez-vous vraiment supprimer ces commentaires ?";
1185
			if (commentaireListe.size() == 1) {
1185
			if (commentaireListe.size() == 1) {
1186
				message = "Voulez-vous vraiment supprimer ce commentaire ?";
1186
				message = "Voulez-vous vraiment supprimer ce commentaire ?";
1187
			}
1187
			}
1188
			
1188
			
1189
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
1189
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
1190
				public void handleEvent(MessageBoxEvent ce) {  
1190
				public void handleEvent(MessageBoxEvent ce) {  
1191
					Dialog dialog = (Dialog) ce.getComponent();
1191
					Dialog dialog = (Dialog) ce.getComponent();
1192
				    Button btn = ce.getButtonClicked();  
1192
				    Button btn = ce.getButtonClicked();  
1193
				    	   
1193
				    	   
1194
				    if (btn.getText().equals(dialog.yesText)) {
1194
				    if (btn.getText().equals(dialog.yesText)) {
1195
				    	supprimerCommentaire(panneauCentre.getContenu(), commentaireListe);
1195
				    	supprimerCommentaire(panneauCentre.getContenu(), commentaireListe);
1196
				    }
1196
				    }
1197
				}
1197
				}
1198
			};
1198
			};
1199
				     
1199
				     
1200
			MessageBox.confirm("Supprimer un commentaire", message, listenerSuppression);
1200
			MessageBox.confirm("Supprimer un commentaire", message, listenerSuppression);
1201
		}
1201
		}
1202
	}
1202
	}
1203
	
1203
	
1204
	public void selectionnerCommentaire(Rafraichissable vueARafraichir, String commentaireId) {
1204
	public void selectionnerCommentaire(Rafraichissable vueARafraichir, String commentaireId) {
1205
		modele.selectionnerCommentaire(vueARafraichir, commentaireId, getProjetId(), null);
1205
		modele.selectionnerCommentaire(vueARafraichir, commentaireId, getProjetId(), null);
1206
	}
1206
	}
1207
	
1207
	
1208
	public void selectionnerCommentaireParTitre(Rafraichissable vueARafraichir, String titre) {
1208
	public void selectionnerCommentaireParTitre(Rafraichissable vueARafraichir, String titre) {
1209
		modele.selectionnerCommentaire(vueARafraichir, null, getProjetId(), titre);
1209
		modele.selectionnerCommentaire(vueARafraichir, null, getProjetId(), titre);
1210
	}
1210
	}
1211
	
1211
	
1212
	public void ajouterCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
1212
	public void ajouterCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
1213
		modele.ajouterCommentaire(vueARafraichir, commentaire);
1213
		modele.ajouterCommentaire(vueARafraichir, commentaire);
1214
	}
1214
	}
1215
	
1215
	
1216
	public void modifierCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
1216
	public void modifierCommentaire(Rafraichissable vueARafraichir, Commentaire commentaire) {
1217
		modele.modifierCommentaire(vueARafraichir, commentaire);
1217
		modele.modifierCommentaire(vueARafraichir, commentaire);
1218
	}
1218
	}
1219
	
1219
	
1220
	public void supprimerCommentaire(Rafraichissable vueARafraichir, List<Commentaire> commentairesListe) {
1220
	public void supprimerCommentaire(Rafraichissable vueARafraichir, List<Commentaire> commentairesListe) {
1221
		if (commentairesListe != null && commentairesListe.size() > 0) {
1221
		if (commentairesListe != null && commentairesListe.size() > 0) {
1222
			String idCommentaireSeparesParVirgule = "" ;
1222
			String idCommentaireSeparesParVirgule = "" ;
1223
			Iterator<Commentaire> it = commentairesListe.iterator();
1223
			Iterator<Commentaire> it = commentairesListe.iterator();
1224
			while (it.hasNext()) {
1224
			while (it.hasNext()) {
1225
				idCommentaireSeparesParVirgule += it.next().getId();
1225
				idCommentaireSeparesParVirgule += it.next().getId();
1226
				if (it.hasNext()) {
1226
				if (it.hasNext()) {
1227
					idCommentaireSeparesParVirgule += ",";
1227
					idCommentaireSeparesParVirgule += ",";
1228
				}
1228
				}
1229
			}
1229
			}
1230
			modele.supprimerCommentaire(vueARafraichir, idCommentaireSeparesParVirgule);
1230
			modele.supprimerCommentaire(vueARafraichir, idCommentaireSeparesParVirgule);
1231
			modele.supprimerCollectionACommentaire(vueARafraichir, idCommentaireSeparesParVirgule, CollectionACommentaireAsyncDao.SUPPRESSION_PAR_COMMENTAIRE);
1231
			modele.supprimerCollectionACommentaire(vueARafraichir, idCommentaireSeparesParVirgule, CollectionACommentaireAsyncDao.SUPPRESSION_PAR_COMMENTAIRE);
1232
		}
1232
		}
1233
	}
1233
	}
1234
	
1234
	
1235
	//+----------------------------------------------------------------------------------------------------------------+
1235
	//+----------------------------------------------------------------------------------------------------------------+
1236
	//												RAFRAICHISSEMENT
1236
	//												RAFRAICHISSEMENT
1237
	//+----------------------------------------------------------------------------------------------------------------+
1237
	//+----------------------------------------------------------------------------------------------------------------+
1238
	
1238
	
1239
	public void rafraichir(Object nouvellesDonnees) {
1239
	public void rafraichir(Object nouvellesDonnees) {
1240
		if (nouvellesDonnees instanceof Utilisateur) {
1240
		if (nouvellesDonnees instanceof Utilisateur) {
1241
			repandreEtatIdentification((Utilisateur) nouvellesDonnees);
1241
			repandreEtatIdentification((Utilisateur) nouvellesDonnees);
1242
		} else if (nouvellesDonnees instanceof Information) {
1242
		} else if (nouvellesDonnees instanceof Information) {
1243
			Information info = (Information) nouvellesDonnees;
1243
			Information info = (Information) nouvellesDonnees;
1244
			if (info.getType().equals("modification_personne")) {
1244
			if (info.getType().equals("modification_personne")) {
1245
				repandreInfoMiseAJourUtilisateur();
1245
				repandreInfoMiseAJourUtilisateur();
1246
			}
1246
			}
1247
		} else {
1247
		} else {
1248
			GWT.log(i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
1248
			GWT.log(i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
1249
		}
1249
		}
1250
	}
1250
	}
1251
	
1251
	
1252
	//+----------------------------------------------------------------------------------------------------------------+
1252
	//+----------------------------------------------------------------------------------------------------------------+
1253
	//												GESTION du STATUT
1253
	//												GESTION du STATUT
1254
	//+----------------------------------------------------------------------------------------------------------------+
1254
	//+----------------------------------------------------------------------------------------------------------------+
1255
	
1255
	
1256
	public void afficherPopinChargement()	{
1256
	public void afficherPopinChargement()	{
1257
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).center();
1257
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).center();
1258
	}
1258
	}
1259
		
1259
		
1260
	public void masquerPopinChargement()	{		
1260
	public void masquerPopinChargement()	{		
1261
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).hide();
1261
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).hide();
1262
	}
1262
	}
1263
 
1263
 
1264
}
1264
}