Subversion Repositories eFlore/Applications.coel

Rev

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

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