Subversion Repositories eFlore/Applications.coel

Rev

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

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