Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 936 Rev 941
1
package org.tela_botanica.client;
1
package org.tela_botanica.client;
2
 
2
 
3
import java.util.Iterator;
3
import java.util.Iterator;
4
import java.util.List;
4
import java.util.List;
5
 
5
 
6
import org.tela_botanica.client.composants.AideFenetre;
6
import org.tela_botanica.client.composants.AideFenetre;
7
import org.tela_botanica.client.composants.IdentificationFenetre;
7
import org.tela_botanica.client.composants.IdentificationFenetre;
8
import org.tela_botanica.client.composants.LicenceFenetre;
8
import org.tela_botanica.client.composants.LicenceFenetre;
9
import org.tela_botanica.client.composants.ParametreFenetre;
9
import org.tela_botanica.client.composants.ParametreFenetre;
10
import org.tela_botanica.client.configuration.APropos;
10
import org.tela_botanica.client.configuration.APropos;
11
import org.tela_botanica.client.configuration.Configuration;
11
import org.tela_botanica.client.configuration.Configuration;
12
import org.tela_botanica.client.i18n.Constantes;
12
import org.tela_botanica.client.i18n.Constantes;
13
import org.tela_botanica.client.i18n.ErrorMessages;
13
import org.tela_botanica.client.i18n.ErrorMessages;
14
import org.tela_botanica.client.interfaces.Rafraichissable;
14
import org.tela_botanica.client.interfaces.Rafraichissable;
15
import org.tela_botanica.client.modeles.Information;
15
import org.tela_botanica.client.modeles.Information;
16
import org.tela_botanica.client.modeles.MenuApplicationId;
16
import org.tela_botanica.client.modeles.MenuApplicationId;
17
import org.tela_botanica.client.modeles.Utilisateur;
17
import org.tela_botanica.client.modeles.Utilisateur;
18
import org.tela_botanica.client.modeles.ValeurListe;
18
import org.tela_botanica.client.modeles.ValeurListe;
19
import org.tela_botanica.client.modeles.collection.Collection;
19
import org.tela_botanica.client.modeles.collection.Collection;
20
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
20
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
21
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
21
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
22
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
22
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
23
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
23
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
24
import org.tela_botanica.client.modeles.collection.CollectionListe;
24
import org.tela_botanica.client.modeles.collection.CollectionListe;
25
import org.tela_botanica.client.modeles.personne.Personne;
25
import org.tela_botanica.client.modeles.personne.Personne;
26
import org.tela_botanica.client.modeles.personne.PersonneListe;
26
import org.tela_botanica.client.modeles.personne.PersonneListe;
27
import org.tela_botanica.client.modeles.projet.Projet;
27
import org.tela_botanica.client.modeles.projet.Projet;
28
import org.tela_botanica.client.modeles.projet.ProjetListe;
28
import org.tela_botanica.client.modeles.projet.ProjetListe;
29
import org.tela_botanica.client.modeles.publication.Publication;
29
import org.tela_botanica.client.modeles.publication.Publication;
30
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
30
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
31
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
31
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
32
import org.tela_botanica.client.modeles.publication.PublicationListe;
32
import org.tela_botanica.client.modeles.publication.PublicationListe;
33
import org.tela_botanica.client.modeles.structure.Structure;
33
import org.tela_botanica.client.modeles.structure.Structure;
34
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
34
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
35
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
35
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
36
import org.tela_botanica.client.modeles.structure.StructureConservation;
36
import org.tela_botanica.client.modeles.structure.StructureConservation;
37
import org.tela_botanica.client.modeles.structure.StructureListe;
37
import org.tela_botanica.client.modeles.structure.StructureListe;
38
import org.tela_botanica.client.modeles.structure.StructureValorisation;
38
import org.tela_botanica.client.modeles.structure.StructureValorisation;
39
import org.tela_botanica.client.util.Debug;
39
import org.tela_botanica.client.util.Debug;
40
import org.tela_botanica.client.vues.ContenuVue;
40
import org.tela_botanica.client.vues.ContenuVue;
41
import org.tela_botanica.client.vues.EnteteVue;
41
import org.tela_botanica.client.vues.EnteteVue;
42
import org.tela_botanica.client.vues.Formulaire;
42
import org.tela_botanica.client.vues.Formulaire;
43
import org.tela_botanica.client.vues.PopupChargement;
43
import org.tela_botanica.client.vues.PopupChargement;
44
import org.tela_botanica.client.vues.StatutVue;
44
import org.tela_botanica.client.vues.StatutVue;
45
import org.tela_botanica.client.vues.MenuVue;
45
import org.tela_botanica.client.vues.MenuVue;
46
import org.tela_botanica.client.vues.accueil.AccueilVue;
46
import org.tela_botanica.client.vues.accueil.AccueilVue;
47
import org.tela_botanica.client.vues.collection.CollectionForm;
47
import org.tela_botanica.client.vues.collection.CollectionForm;
48
import org.tela_botanica.client.vues.collection.CollectionListeVue;
48
import org.tela_botanica.client.vues.collection.CollectionListeVue;
49
import org.tela_botanica.client.vues.collection.CollectionVue;
49
import org.tela_botanica.client.vues.collection.CollectionVue;
50
import org.tela_botanica.client.vues.personne.PersonneForm;
50
import org.tela_botanica.client.vues.personne.PersonneForm;
51
import org.tela_botanica.client.vues.personne.PersonneVue;
51
import org.tela_botanica.client.vues.personne.PersonneVue;
52
import org.tela_botanica.client.vues.projet.ProjetForm;
52
import org.tela_botanica.client.vues.projet.ProjetForm;
53
import org.tela_botanica.client.vues.projet.ProjetVue;
53
import org.tela_botanica.client.vues.projet.ProjetVue;
54
import org.tela_botanica.client.vues.publication.PublicationForm;
54
import org.tela_botanica.client.vues.publication.PublicationForm;
55
import org.tela_botanica.client.vues.publication.PublicationVue;
55
import org.tela_botanica.client.vues.publication.PublicationVue;
56
import org.tela_botanica.client.vues.structure.StructureForm;
56
import org.tela_botanica.client.vues.structure.StructureForm;
57
import org.tela_botanica.client.vues.structure.StructureVue;
57
import org.tela_botanica.client.vues.structure.StructureVue;
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 repandreEtatIdentification(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);
299
		Registry.register(RegistreId.UTILISATEUR_COURANT, utilisateur);
300
		// Propagation de l'information de mise à jour de l'utilisateur
300
		// Propagation de l'information de mise à jour de l'utilisateur
301
		repandreInfoMiseAJourUtilisateur();
301
		repandreInfoMiseAJourUtilisateur();
302
	}
302
	}
303
	
303
	
304
	public void repandreInfoMiseAJourUtilisateur() {
304
	public void repandreInfoMiseAJourUtilisateur() {
305
		// Création de l'information de mise à jour de l'utilisateur
305
		// Création de l'information de mise à jour de l'utilisateur
306
		Information info = new Information("maj_utilisateur");
306
		Information info = new Information("maj_utilisateur");
307
 
307
 
308
		// Rafraichissement de la fenêtre d'Identification
308
		// Rafraichissement de la fenêtre d'Identification
309
		if (fenetreIdentification != null) {
309
		if (fenetreIdentification != null && fenetreIdentification.isVisible()) {
310
			fenetreIdentification.rafraichir(info);
310
			fenetreIdentification.rafraichir(info);
311
		}
311
		}
312
		
312
		
313
		// Rafraichissement du panneau Nord
313
		// Rafraichissement du panneau Nord
314
		panneauNord.rafraichir(info);
314
		panneauNord.rafraichir(info);
315
 
315
 
316
		// Rafraichissement du panneau Centre
316
		// Rafraichissement du panneau Centre
317
		if (panneauCentre != null) {
317
		if (panneauCentre != null) {
318
			panneauCentre.rafraichir(info);
318
			panneauCentre.rafraichir(info);
319
		}
319
		}
320
	}
320
	}
321
	
321
	
322
	public void modifierUtilisateur()	{
322
	public void modifierUtilisateur()	{
323
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
323
		Utilisateur utilisateurCourant = (Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT);
324
		panneauNord.rafraichir(utilisateurCourant);
324
		panneauNord.rafraichir(utilisateurCourant);
325
		modele.modifierUtilisateur(this, utilisateurCourant);
325
		modele.modifierUtilisateur(this, utilisateurCourant);
326
	}
326
	}
327
	
327
	
328
	public void mettreAJourPersonneAnnuaire(Utilisateur utilisateur)	{
328
	public void mettreAJourPersonneAnnuaire(Utilisateur utilisateur)	{
329
		panneauNord.rafraichir(utilisateur);
329
		panneauNord.rafraichir(utilisateur);
330
		modele.mettreAJourPersonneAnnuaire(this, utilisateur);
330
		modele.mettreAJourPersonneAnnuaire(this, utilisateur);
331
	}
331
	}
332
 
332
 
333
	//+----------------------------------------------------------------------------------------------------------------+
333
	//+----------------------------------------------------------------------------------------------------------------+
334
	//												GESTION DES VALEURS ET LISTES
334
	//												GESTION DES VALEURS ET LISTES
335
	//+----------------------------------------------------------------------------------------------------------------+
335
	//+----------------------------------------------------------------------------------------------------------------+
336
 
336
 
337
	public void obtenirListeValeurEtRafraichir(Rafraichissable vueARafraichir, String listeId)	{
337
	public void obtenirListeValeurEtRafraichir(Rafraichissable vueARafraichir, String listeId)	{
338
		modele.obtenirListeValeurs(vueARafraichir, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId));
338
		modele.obtenirListeValeurs(vueARafraichir, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeId));
339
	}
339
	}
340
	
340
	
341
	public void obtenirValeurEtRafraichir(Rafraichissable vue, String listeId, String identifiantValeur)	{
341
	public void obtenirValeurEtRafraichir(Rafraichissable vue, String listeId, String identifiantValeur)	{
342
		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);
343
	}
343
	}
344
	
344
	
345
	public void obtenirListeRegionsEtRafraichir(Rafraichissable vue, String strListeId, String strPays)	{
345
	public void obtenirListeRegionsEtRafraichir(Rafraichissable vue, String strListeId, String strPays)	{
346
		modele.obtenirListeRegion(vue, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(strListeId), strPays+".__");
346
		modele.obtenirListeRegion(vue, ((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(strListeId), strPays+".__");
347
	}
347
	}
348
	
348
	
349
	//+----------------------------------------------------------------------------------------------------------------+
349
	//+----------------------------------------------------------------------------------------------------------------+
350
	//												GESTION des APPLETS de l'ACCUEIL
350
	//												GESTION des APPLETS de l'ACCUEIL
351
	//+----------------------------------------------------------------------------------------------------------------+
351
	//+----------------------------------------------------------------------------------------------------------------+
352
	
352
	
353
	public void afficherAccueil() {
353
	public void afficherAccueil() {
354
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {
354
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {
355
			panneauCentre.removeAll();
355
			panneauCentre.removeAll();
356
			panneauCentre.add(new AccueilVue(this));
356
			panneauCentre.add(new AccueilVue(this));
357
		}
357
		}
358
	}
358
	}
359
	
359
	
360
	//+----------------------------------------------------------------------------------------------------------------+
360
	//+----------------------------------------------------------------------------------------------------------------+
361
	//												GESTION des PROJETS
361
	//												GESTION des PROJETS
362
	//+----------------------------------------------------------------------------------------------------------------+
362
	//+----------------------------------------------------------------------------------------------------------------+
363
	
363
	
364
	public void afficherFormProjet(String projetId) {
364
	public void afficherFormProjet(String projetId) {
365
		panneauCentre.removeAll();
365
		panneauCentre.removeAll();
366
		ProjetForm projetForm = new ProjetForm(this, projetId);
366
		ProjetForm projetForm = new ProjetForm(this, projetId);
367
		panneauCentre.add(projetForm);
367
		panneauCentre.add(projetForm);
368
		
368
		
369
		panneauCentre.layout();
369
		panneauCentre.layout();
370
	}
370
	}
371
	
371
	
372
	public void afficherListeProjets(ProjetListe projetsACharger)	{
372
	public void afficherListeProjets(ProjetListe projetsACharger)	{
373
		if (!(panneauCentre.getContenu() instanceof ProjetVue))	{
373
		if (!(panneauCentre.getContenu() instanceof ProjetVue))	{
374
			panneauCentre.removeAll();
374
			panneauCentre.removeAll();
375
			panneauCentre.add(new ProjetVue(this));
375
			panneauCentre.add(new ProjetVue(this));
376
			panneauCentre.setId(ComposantId.PANNEAU_PROJET_LISTE);
376
			panneauCentre.setId(ComposantId.PANNEAU_PROJET_LISTE);
377
			panneauCentre.layout();
377
			panneauCentre.layout();
378
		}	
378
		}	
379
		
379
		
380
		panneauCentre.getContenu().rafraichir(projetsACharger);
380
		panneauCentre.getContenu().rafraichir(projetsACharger);
381
	}
381
	}
382
	
382
	
383
	public void clicListeProjet(Projet projet) {
383
	public void clicListeProjet(Projet projet) {
384
		panneauCentre.getContenu().rafraichir(projet);
384
		panneauCentre.getContenu().rafraichir(projet);
385
	}
385
	}
386
 
386
 
387
	public void clicSupprimerProjet(final List<Projet> projetListe) {
387
	public void clicSupprimerProjet(final List<Projet> projetListe) {
388
		if (projetListe.size() <= 0) {
388
		if (projetListe.size() <= 0) {
389
			MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); 
389
			MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); 
390
		} else {
390
		} else {
391
			String message = "Voulez-vous vraiment supprimer ces projets ?";
391
			String message = "Voulez-vous vraiment supprimer ces projets ?";
392
			if (projetListe.size() == 1) {
392
			if (projetListe.size() == 1) {
393
				message = "Voulez-vous vraiment supprimer ce projet ?";
393
				message = "Voulez-vous vraiment supprimer ce projet ?";
394
			}
394
			}
395
			
395
			
396
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
396
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
397
				public void handleEvent(MessageBoxEvent ce) {  
397
				public void handleEvent(MessageBoxEvent ce) {  
398
					Dialog dialog = (Dialog) ce.getComponent();
398
					Dialog dialog = (Dialog) ce.getComponent();
399
				    Button btn = ce.getButtonClicked();  
399
				    Button btn = ce.getButtonClicked();  
400
				    	   
400
				    	   
401
				    if (btn.getText().equals(dialog.yesText)) {
401
				    if (btn.getText().equals(dialog.yesText)) {
402
				    	modele.supprimerProjet(panneauCentre.getContenu(), projetListe);  
402
				    	modele.supprimerProjet(panneauCentre.getContenu(), projetListe);  
403
				    }
403
				    }
404
				}
404
				}
405
			};
405
			};
406
				     
406
				     
407
			MessageBox.confirm("Supprimer un projet", message, listenerSuppression);
407
			MessageBox.confirm("Supprimer un projet", message, listenerSuppression);
408
		}
408
		}
409
		
409
		
410
	}
410
	}
411
 
411
 
412
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
412
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
413
		if (projetsSelectionnes.size() == 0) {
413
		if (projetsSelectionnes.size() == 0) {
414
			Info.display("Information", "Veuillez sélectionner un projet.");
414
			Info.display("Information", "Veuillez sélectionner un projet.");
415
		} else if (projetsSelectionnes.size() > 1) {
415
		} else if (projetsSelectionnes.size() > 1) {
416
			Info.display("Information", "Veuillez sélectionner un seul projet à la fois.");
416
			Info.display("Information", "Veuillez sélectionner un seul projet à la fois.");
417
		} else if (projetsSelectionnes.size() == 1) {
417
		} else if (projetsSelectionnes.size() == 1) {
418
			afficherFormProjet(projetsSelectionnes.get(0).getId());
418
			afficherFormProjet(projetsSelectionnes.get(0).getId());
419
		} else {
419
		} else {
420
			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.");
421
		}
421
		}
422
	}
422
	}
423
 
423
 
424
	public void clicAjouterProjet() {
424
	public void clicAjouterProjet() {
425
		afficherFormProjet(null);
425
		afficherFormProjet(null);
426
	}
426
	}
427
 
427
 
428
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId) {
428
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId) {
429
		modele.selectionnerProjet(vueARafraichir, projetId);
429
		modele.selectionnerProjet(vueARafraichir, projetId);
430
	}
430
	}
431
 
431
 
432
	public void ajouterProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
432
	public void ajouterProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
433
		modele.ajouterProjet(vueARafraichir, projetCollecte);
433
		modele.ajouterProjet(vueARafraichir, projetCollecte);
434
	}
434
	}
435
 
435
 
436
	public void modifierProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
436
	public void modifierProjet(Rafraichissable vueARafraichir, Projet projetCollecte) {
437
		modele.modifierProjet(vueARafraichir, projetCollecte);	
437
		modele.modifierProjet(vueARafraichir, projetCollecte);	
438
	}
438
	}
439
	
439
	
440
	//+----------------------------------------------------------------------------------------------------------------+
440
	//+----------------------------------------------------------------------------------------------------------------+
441
	// SELECTION : projet
441
	// SELECTION : projet
442
	/**
442
	/**
443
	 * Retourne l'identifiant du projet courrant de l'application.
443
	 * Retourne l'identifiant du projet courrant de l'application.
444
	 */
444
	 */
445
	public String getProjetId() {
445
	public String getProjetId() {
446
		String id = null;
446
		String id = null;
447
		Projet projetCourant = (Projet) Registry.get(RegistreId.PROJET_COURANT);
447
		Projet projetCourant = (Projet) Registry.get(RegistreId.PROJET_COURANT);
448
		if (projetCourant != null && !projetCourant.getId().equals("")) {
448
		if (projetCourant != null && !projetCourant.getId().equals("")) {
449
			id = projetCourant.getId();
449
			id = projetCourant.getId();
450
		}
450
		}
451
		return id;
451
		return id;
452
	}
452
	}
453
		
453
		
454
	public void selectionnerProjetCourant(Projet projetSelectionne) {
454
	public void selectionnerProjetCourant(Projet projetSelectionne) {
455
		Registry.register(RegistreId.PROJET_COURANT, projetSelectionne);
455
		Registry.register(RegistreId.PROJET_COURANT, projetSelectionne);
456
		if (panneauCentre.getContenu() instanceof ProjetVue)	{
456
		if (panneauCentre.getContenu() instanceof ProjetVue)	{
457
			selectionnerProjet(panneauCentre.getContenu(), null);
457
			selectionnerProjet(panneauCentre.getContenu(), null);
458
		} else if (panneauCentre.getContenu() instanceof StructureVue)	{
458
		} else if (panneauCentre.getContenu() instanceof StructureVue)	{
459
			selectionnerStructure(panneauCentre.getContenu(), null);
459
			selectionnerStructure(panneauCentre.getContenu(), null);
460
		} else if (panneauCentre.getContenu() instanceof CollectionVue)	{
460
		} else if (panneauCentre.getContenu() instanceof CollectionVue)	{
461
			selectionnerCollection(panneauCentre.getContenu(), null);
461
			selectionnerCollection(panneauCentre.getContenu(), null);
462
		} else if (panneauCentre.getContenu() instanceof PersonneVue) {
462
		} else if (panneauCentre.getContenu() instanceof PersonneVue) {
463
			selectionnerPersonne(panneauCentre.getContenu(), null, getProjetId());
463
			selectionnerPersonne(panneauCentre.getContenu(), null, getProjetId());
464
		} else if (panneauCentre.getContenu() instanceof PublicationVue) {
464
		} else if (panneauCentre.getContenu() instanceof PublicationVue) {
465
			selectionnerPublication(panneauCentre.getContenu(), null);
465
			selectionnerPublication(panneauCentre.getContenu(), null);
466
		}
466
		}
467
	}
467
	}
468
	
468
	
469
	
469
	
470
	//+----------------------------------------------------------------------------------------------------------------+
470
	//+----------------------------------------------------------------------------------------------------------------+
471
	//												GESTION DES STRUCTURES
471
	//												GESTION DES STRUCTURES
472
	//+----------------------------------------------------------------------------------------------------------------+
472
	//+----------------------------------------------------------------------------------------------------------------+
473
 
473
 
474
	public void afficherListeStructures(StructureListe structuresACharger) {
474
	public void afficherListeStructures(StructureListe structuresACharger) {
475
		if (!(panneauCentre.getContenu() instanceof StructureVue))	{	
475
		if (!(panneauCentre.getContenu() instanceof StructureVue))	{	
476
			panneauCentre.removeAll();
476
			panneauCentre.removeAll();
477
			panneauCentre.add(new StructureVue(this));
477
			panneauCentre.add(new StructureVue(this));
478
		}
478
		}
479
		panneauCentre.getContenu().rafraichir(structuresACharger);
479
		panneauCentre.getContenu().rafraichir(structuresACharger);
480
	}
480
	}
481
	
481
	
482
	public void afficherFormStructure(String structureId) {
482
	public void afficherFormStructure(String structureId) {
483
		String mode = Formulaire.MODE_AJOUTER;
483
		String mode = Formulaire.MODE_AJOUTER;
484
		if (structureId != null) {
484
		if (structureId != null) {
485
			mode = Formulaire.MODE_MODIFIER;
485
			mode = Formulaire.MODE_MODIFIER;
486
		}
486
		}
487
		
487
		
488
		panneauCentre.removeAll();
488
		panneauCentre.removeAll();
489
		StructureForm structureForm = new StructureForm(this, mode);
489
		StructureForm structureForm = new StructureForm(this, mode);
490
		panneauCentre.add(structureForm);
490
		panneauCentre.add(structureForm);
491
		
491
		
492
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
492
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
493
			selectionnerStructure(structureForm, structureId);
493
			selectionnerStructure(structureForm, structureId);
494
			selectionnerStructureAPersonne(structureForm, structureId, StructureAPersonne.ROLE_EQUIPE);
494
			selectionnerStructureAPersonne(structureForm, structureId, StructureAPersonne.ROLE_EQUIPE);
495
		}
495
		}
496
		
496
		
497
		panneauCentre.layout();
497
		panneauCentre.layout();
498
	}
498
	}
499
	
499
	
500
	public void clicListeStructure(Structure structure) {
500
	public void clicListeStructure(Structure structure) {
501
		panneauCentre.getContenu().rafraichir(structure);
501
		panneauCentre.getContenu().rafraichir(structure);
502
		if (structure != null && structure.getPersonnel() == null) {
502
		if (structure != null && structure.getPersonnel() == null) {
503
			selectionnerStructureAPersonne(panneauCentre.getContenu(), structure.getId(), StructureAPersonne.ROLE_EQUIPE);
503
			selectionnerStructureAPersonne(panneauCentre.getContenu(), structure.getId(), StructureAPersonne.ROLE_EQUIPE);
504
		}
504
		}
505
	}
505
	}
506
 
506
 
507
	public void clicAjouterStructure() {
507
	public void clicAjouterStructure() {
508
		afficherFormStructure(null);
508
		afficherFormStructure(null);
509
	}
509
	}
510
	
510
	
511
	public void clicModifierStructure(List<Structure> structureSelection) {
511
	public void clicModifierStructure(List<Structure> structureSelection) {
512
		if (structureSelection.size() == 0) {
512
		if (structureSelection.size() == 0) {
513
			Info.display("Information", "Veuillez sélectionner une structure.");
513
			Info.display("Information", "Veuillez sélectionner une structure.");
514
		} else if (structureSelection.size() > 1) {
514
		} else if (structureSelection.size() > 1) {
515
			Info.display("Information", "Veuillez sélectionner une seule structure à la fois.");
515
			Info.display("Information", "Veuillez sélectionner une seule structure à la fois.");
516
		} else if (structureSelection.size() == 1) {
516
		} else if (structureSelection.size() == 1) {
517
			afficherFormStructure(structureSelection.get(0).getId());
517
			afficherFormStructure(structureSelection.get(0).getId());
518
		} else {
518
		} else {
519
			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.");
520
		}
520
		}
521
	}
521
	}
522
	
522
	
523
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
523
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
524
		if (structureSelection.size() == 0) {
524
		if (structureSelection.size() == 0) {
525
			Info.display("Information", "Veuillez sélectionner une structure.");
525
			Info.display("Information", "Veuillez sélectionner une structure.");
526
		} else if(structureSelection.size() > 0) {
526
		} else if(structureSelection.size() > 0) {
527
			String titre = "Supprimer des structures";
527
			String titre = "Supprimer des structures";
528
			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 ?";
529
			if (structureSelection.size() == 1) {
529
			if (structureSelection.size() == 1) {
530
				titre = "Supprimer une structure";
530
				titre = "Supprimer une structure";
531
				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 ?";
532
			}
532
			}
533
			
533
			
534
			final Listener<MessageBoxEvent> suppressionEcouteur = new Listener<MessageBoxEvent>() { 
534
			final Listener<MessageBoxEvent> suppressionEcouteur = new Listener<MessageBoxEvent>() { 
535
				public void handleEvent(MessageBoxEvent ce) {  
535
				public void handleEvent(MessageBoxEvent ce) {  
536
					Dialog dialog = (Dialog) ce.getComponent();
536
					Dialog dialog = (Dialog) ce.getComponent();
537
					Button btn = ce.getButtonClicked();  
537
					Button btn = ce.getButtonClicked();  
538
 
538
 
539
					if (btn.getText().equals(dialog.yesText))	{
539
					if (btn.getText().equals(dialog.yesText))	{
540
						String idStr = "" ;
540
						String idStr = "" ;
541
						for(int i = 0 ; i < structureSelection.size() ; i++) {
541
						for(int i = 0 ; i < structureSelection.size() ; i++) {
542
							idStr += structureSelection.get(i).getId()+","; 
542
							idStr += structureSelection.get(i).getId()+","; 
543
						}
543
						}
544
						supprimerStructure(vue, idStr);
544
						supprimerStructure(vue, idStr);
545
					}
545
					}
546
				}
546
				}
547
			};
547
			};
548
			
548
			
549
			MessageBox.confirm(titre, message, suppressionEcouteur);
549
			MessageBox.confirm(titre, message, suppressionEcouteur);
550
		} else {
550
		} else {
551
			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.");
552
		}
552
		}
553
	}
553
	}
554
	
554
	
555
	public void selectionnerStructure(Rafraichissable vueARafraichir, String structureId) {
555
	public void selectionnerStructure(Rafraichissable vueARafraichir, String structureId) {
556
		modele.selectionnerStructure(vueARafraichir, getProjetId(), structureId);
556
		modele.selectionnerStructure(vueARafraichir, getProjetId(), structureId);
557
	}
557
	}
558
	
558
	
559
	public void selectionnerStructureParProjet(Rafraichissable vueARafraichir, String projetId) {
559
	public void selectionnerStructureParProjet(Rafraichissable vueARafraichir, String projetId) {
560
		modele.selectionnerStructure(vueARafraichir, projetId, null);
560
		modele.selectionnerStructure(vueARafraichir, projetId, null);
561
	}
561
	}
562
	
562
	
563
	public void ajouterStructure(Rafraichissable vueARafraichir, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
563
	public void ajouterStructure(Rafraichissable vueARafraichir, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
564
		modele.ajouterStructure(vueARafraichir, structure, conservation, valorisation);
564
		modele.ajouterStructure(vueARafraichir, structure, conservation, valorisation);
565
	}
565
	}
566
	
566
	
567
	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) {
568
		modele.modifierStructure(vueARafraichir, structureId, structure, conservation, valorisation);
568
		modele.modifierStructure(vueARafraichir, structureId, structure, conservation, valorisation);
569
	}
569
	}
570
	
570
	
571
	public void supprimerStructure(Rafraichissable vueARafraichir, String IdentifiantsStructureSepareParVirgule) {
571
	public void supprimerStructure(Rafraichissable vueARafraichir, String IdentifiantsStructureSepareParVirgule) {
572
		modele.supprimerStructure(vueARafraichir, IdentifiantsStructureSepareParVirgule);
572
		modele.supprimerStructure(vueARafraichir, IdentifiantsStructureSepareParVirgule);
573
	}
573
	}
574
	
574
	
575
	//+----------------------------------------------------------------------------------------------------------------+
575
	//+----------------------------------------------------------------------------------------------------------------+
576
	// GESTION de la relation STRUCTURE A PERSONNE
576
	// GESTION de la relation STRUCTURE A PERSONNE
577
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId) {
577
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId) {
578
		modele.selectionnerStructureAPersonne(vueARafraichir, structureId, roleId);
578
		modele.selectionnerStructureAPersonne(vueARafraichir, structureId, roleId);
579
	}
579
	}
580
	
580
	
581
	public void ajouterStructureAPersonne(Rafraichissable vueARafraichir, String structureId, StructureAPersonneListe personnelAjoute) {
581
	public void ajouterStructureAPersonne(Rafraichissable vueARafraichir, String structureId, StructureAPersonneListe personnelAjoute) {
582
		if (personnelAjoute != null && personnelAjoute.size() > 0) {
582
		if (personnelAjoute != null && personnelAjoute.size() > 0) {
583
			for (Iterator<String> it = personnelAjoute.keySet().iterator(); it.hasNext();) {
583
			for (Iterator<String> it = personnelAjoute.keySet().iterator(); it.hasNext();) {
584
				modele.ajouterStructureAPersonne(vueARafraichir, structureId, (StructureAPersonne) personnelAjoute.get(it.next()));
584
				modele.ajouterStructureAPersonne(vueARafraichir, structureId, (StructureAPersonne) personnelAjoute.get(it.next()));
585
			}
585
			}
586
		}
586
		}
587
	}
587
	}
588
	
588
	
589
	public void modifierStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelModifie) {
589
	public void modifierStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelModifie) {
590
		if (personnelModifie != null && personnelModifie.size() > 0) {
590
		if (personnelModifie != null && personnelModifie.size() > 0) {
591
			for (Iterator<String> it = personnelModifie.keySet().iterator(); it.hasNext();) {
591
			for (Iterator<String> it = personnelModifie.keySet().iterator(); it.hasNext();) {
592
				modele.modifierStructureAPersonne(vueARafraichir, (StructureAPersonne) personnelModifie.get(it.next()));
592
				modele.modifierStructureAPersonne(vueARafraichir, (StructureAPersonne) personnelModifie.get(it.next()));
593
			}
593
			}
594
		}
594
		}
595
	}
595
	}
596
	
596
	
597
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelSupprime) {
597
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, StructureAPersonneListe personnelSupprime) {
598
		if (personnelSupprime != null && personnelSupprime.size() > 0) {
598
		if (personnelSupprime != null && personnelSupprime.size() > 0) {
599
			String idStructureAPersonneSepareParVirgule = "" ;
599
			String idStructureAPersonneSepareParVirgule = "" ;
600
			Iterator<String> it = personnelSupprime.keySet().iterator();
600
			Iterator<String> it = personnelSupprime.keySet().iterator();
601
			while (it.hasNext()) {
601
			while (it.hasNext()) {
602
				idStructureAPersonneSepareParVirgule += personnelSupprime.get(it.next()).getId();
602
				idStructureAPersonneSepareParVirgule += personnelSupprime.get(it.next()).getId();
603
				idStructureAPersonneSepareParVirgule += (it.hasNext()) ? "," : "";
603
				idStructureAPersonneSepareParVirgule += (it.hasNext()) ? "," : "";
604
			}
604
			}
605
			supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSepareParVirgule);
605
			supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSepareParVirgule);
606
		}
606
		}
607
	}
607
	}
608
	
608
	
609
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, String idStructureAPersonneSeparesParVirgule) {
609
	public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, String idStructureAPersonneSeparesParVirgule) {
610
		modele.supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSeparesParVirgule);
610
		modele.supprimerStructureAPersonne(vueARafraichir, idStructureAPersonneSeparesParVirgule);
611
	}
611
	}
612
	
612
	
613
	public void supprimerStructureAPersonne(final Rafraichissable vueARafraichir, final List<Structure> structuresListe) {
613
	public void supprimerStructureAPersonne(final Rafraichissable vueARafraichir, final List<Structure> structuresListe) {
614
		if (structuresListe.size() != 0) {
614
		if (structuresListe.size() != 0) {
615
			String idStructureSepareParVirgule = "" ;
615
			String idStructureSepareParVirgule = "" ;
616
			Iterator<Structure> it = structuresListe.iterator();
616
			Iterator<Structure> it = structuresListe.iterator();
617
			while (it.hasNext()) {
617
			while (it.hasNext()) {
618
				Structure structure = it.next();
618
				Structure structure = it.next();
619
				idStructureSepareParVirgule += structure.getId();
619
				idStructureSepareParVirgule += structure.getId();
620
				idStructureSepareParVirgule += it.hasNext() ? "," : "";
620
				idStructureSepareParVirgule += it.hasNext() ? "," : "";
621
			}
621
			}
622
			supprimerStructureAPersonne(vueARafraichir, idStructureSepareParVirgule);
622
			supprimerStructureAPersonne(vueARafraichir, idStructureSepareParVirgule);
623
		}
623
		}
624
	}
624
	}
625
	
625
	
626
	//+----------------------------------------------------------------------------------------------------------------+
626
	//+----------------------------------------------------------------------------------------------------------------+
627
	//												GESTION des COLLECTIONS
627
	//												GESTION des COLLECTIONS
628
	//+----------------------------------------------------------------------------------------------------------------+
628
	//+----------------------------------------------------------------------------------------------------------------+
629
	
629
	
630
	public void afficherListeCollections(CollectionListe collectionsACharger) {
630
	public void afficherListeCollections(CollectionListe collectionsACharger) {
631
		if (!(panneauCentre.getContenu() instanceof CollectionVue)) {
631
		if (!(panneauCentre.getContenu() instanceof CollectionVue)) {
632
			panneauCentre.removeAll();
632
			panneauCentre.removeAll();
633
			panneauCentre.add(new CollectionVue(this));
633
			panneauCentre.add(new CollectionVue(this));
634
		}
634
		}
635
		
635
		
636
		panneauCentre.getContenu().rafraichir(collectionsACharger);
636
		panneauCentre.getContenu().rafraichir(collectionsACharger);
637
	}
637
	}
638
	
638
	
639
	public void afficherFormCollection(String collectionId) {
639
	public void afficherFormCollection(String collectionId) {
640
		panneauCentre.removeAll();
640
		panneauCentre.removeAll();
641
		CollectionForm collectionForm = new CollectionForm(this, collectionId);
641
		CollectionForm collectionForm = new CollectionForm(this, collectionId);
642
		panneauCentre.add(collectionForm);
642
		panneauCentre.add(collectionForm);
643
		
643
		
644
		panneauCentre.layout();
644
		panneauCentre.layout();
645
	}
645
	}
646
	
646
	
647
	public void clicListeCollection(Collection collectionCliquee) {
647
	public void clicListeCollection(Collection collectionCliquee) {
648
		panneauCentre.getContenu().rafraichir(collectionCliquee);
648
		panneauCentre.getContenu().rafraichir(collectionCliquee);
649
		if (collectionCliquee != null) {
649
		if (collectionCliquee != null) {
650
			selectionnerCollectionAPersonne(panneauCentre.getContenu(), collectionCliquee.getId(), null);
650
			selectionnerCollectionAPersonne(panneauCentre.getContenu(), collectionCliquee.getId(), null);
651
			selectionnerCollectionAPublication(panneauCentre.getContenu(), collectionCliquee.getId());
651
			selectionnerCollectionAPublication(panneauCentre.getContenu(), collectionCliquee.getId());
652
		} 
652
		} 
653
	}
653
	}
654
	
654
	
655
	public void clicAjouterCollection() {
655
	public void clicAjouterCollection() {
656
		afficherFormCollection(null);
656
		afficherFormCollection(null);
657
	}
657
	}
658
 
658
 
659
	public void clicModifierCollection(List<Collection> selection) {
659
	public void clicModifierCollection(List<Collection> selection) {
660
		if (selection.size() == 0) {
660
		if (selection.size() == 0) {
661
			Info.display("Information", "Veuillez sélectionner une collection.");
661
			Info.display("Information", "Veuillez sélectionner une collection.");
662
		} else if (selection.size() > 1) {
662
		} else if (selection.size() > 1) {
663
			Info.display("Information", "Veuillez sélectionner une seule collection à la fois.");
663
			Info.display("Information", "Veuillez sélectionner une seule collection à la fois.");
664
		} else if (selection.size() == 1) {
664
		} else if (selection.size() == 1) {
665
			afficherFormCollection(selection.get(0).getId());
665
			afficherFormCollection(selection.get(0).getId());
666
		} else {
666
		} else {
667
			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.");
668
		}
668
		}
669
	}
669
	}
670
 
670
 
671
	public void clicSupprimerCollection(CollectionListeVue collectionListeVue, List<Collection> collectionsASupprimer) {
671
	public void clicSupprimerCollection(CollectionListeVue collectionListeVue, List<Collection> collectionsASupprimer) {
672
		// TODO Auto-generated method stub	
672
		// TODO Auto-generated method stub	
673
	}
673
	}
674
 
674
 
675
	public void selectionnerCollection(Rafraichissable vueARafraichir, String collectionId) {
675
	public void selectionnerCollection(Rafraichissable vueARafraichir, String collectionId) {
676
		modele.selectionnerCollection(vueARafraichir, getProjetId(), collectionId);
676
		modele.selectionnerCollection(vueARafraichir, getProjetId(), collectionId);
677
	}
677
	}
678
	
678
	
679
	public void selectionnerCollectionParProjet(Rafraichissable vueARafraichir, String projetId) {
679
	public void selectionnerCollectionParProjet(Rafraichissable vueARafraichir, String projetId) {
680
		modele.selectionnerCollection(vueARafraichir, projetId, null);
680
		modele.selectionnerCollection(vueARafraichir, projetId, null);
681
	}
681
	}
682
	
682
	
683
	public void ajouterCollection(Rafraichissable vueARafraichir, Collection collection) {
683
	public void ajouterCollection(Rafraichissable vueARafraichir, Collection collection) {
684
		modele.ajouterCollection(vueARafraichir, getUtilisateurId(), collection);
684
		modele.ajouterCollection(vueARafraichir, getUtilisateurId(), collection);
685
	}
685
	}
686
	
686
	
687
	public void modifierCollection(Rafraichissable vueARafraichir, Collection collection) {
687
	public void modifierCollection(Rafraichissable vueARafraichir, Collection collection) {
688
		modele.modifierCollection(vueARafraichir, collection);
688
		modele.modifierCollection(vueARafraichir, collection);
689
	}
689
	}
690
	
690
	
691
	public void supprimerCollection(Rafraichissable vueARafraichir, String IdentifiantsCollectionSepareParVirgule) {
691
	public void supprimerCollection(Rafraichissable vueARafraichir, String IdentifiantsCollectionSepareParVirgule) {
692
		modele.supprimerCollection(vueARafraichir, getUtilisateurId(), IdentifiantsCollectionSepareParVirgule);
692
		modele.supprimerCollection(vueARafraichir, getUtilisateurId(), IdentifiantsCollectionSepareParVirgule);
693
	}
693
	}
694
	
694
	
695
	//+----------------------------------------------------------------------------------------------------------------+
695
	//+----------------------------------------------------------------------------------------------------------------+
696
	// GESTION de la relation COLLECTION A PERSONNE
696
	// GESTION de la relation COLLECTION A PERSONNE
697
	
697
	
698
	public void selectionnerCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, String roleId) {
698
	public void selectionnerCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, String roleId) {
699
		modele.selectionnerCollectionAPersonne(vueARafraichir, collectionId, roleId);
699
		modele.selectionnerCollectionAPersonne(vueARafraichir, collectionId, roleId);
700
	}
700
	}
701
	
701
	
702
	public void ajouterCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, CollectionAPersonneListe personnesAjoutees) {
702
	public void ajouterCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, CollectionAPersonneListe personnesAjoutees) {
703
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
703
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
704
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
704
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
705
				modele.ajouterCollectionAPersonne(vueARafraichir, collectionId, (CollectionAPersonne) personnesAjoutees.get(it.next()));
705
				modele.ajouterCollectionAPersonne(vueARafraichir, collectionId, (CollectionAPersonne) personnesAjoutees.get(it.next()));
706
			}
706
			}
707
		}
707
		}
708
	}
708
	}
709
	
709
	
710
	public void modifierCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesModifiees) {
710
	public void modifierCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesModifiees) {
711
		if (personnesModifiees != null && personnesModifiees.size() > 0) {
711
		if (personnesModifiees != null && personnesModifiees.size() > 0) {
712
			for (Iterator<String> it = personnesModifiees.keySet().iterator(); it.hasNext();) {
712
			for (Iterator<String> it = personnesModifiees.keySet().iterator(); it.hasNext();) {
713
				modele.modifierCollectionAPersonne(vueARafraichir, (CollectionAPersonne) personnesModifiees.get(it.next()));
713
				modele.modifierCollectionAPersonne(vueARafraichir, (CollectionAPersonne) personnesModifiees.get(it.next()));
714
			}
714
			}
715
		}
715
		}
716
	}
716
	}
717
	
717
	
718
	public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesSupprimees) {
718
	public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesSupprimees) {
719
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
719
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
720
			String idCollectionAPersonneSeparesParVirgule = "" ;
720
			String idCollectionAPersonneSeparesParVirgule = "" ;
721
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
721
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
722
				idCollectionAPersonneSeparesParVirgule += personnesSupprimees.get(it.next()).getId();
722
				idCollectionAPersonneSeparesParVirgule += personnesSupprimees.get(it.next()).getId();
723
				if (it.hasNext()) {
723
				if (it.hasNext()) {
724
					idCollectionAPersonneSeparesParVirgule += ",";
724
					idCollectionAPersonneSeparesParVirgule += ",";
725
				}
725
				}
726
			}
726
			}
727
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionAPersonneSeparesParVirgule);
727
			modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionAPersonneSeparesParVirgule);
728
		}
728
		}
729
	}
729
	}
730
	
730
	
731
	//+----------------------------------------------------------------------------------------------------------------+
731
	//+----------------------------------------------------------------------------------------------------------------+
732
	// GESTION de la relation COLLECTION A PUBLICATION
732
	// GESTION de la relation COLLECTION A PUBLICATION
733
	
733
	
734
	public void selectionnerCollectionAPublication(Rafraichissable vueARafraichir, String collectionId) {
734
	public void selectionnerCollectionAPublication(Rafraichissable vueARafraichir, String collectionId) {
735
		modele.selectionnerCollectionAPublication(vueARafraichir, collectionId);
735
		modele.selectionnerCollectionAPublication(vueARafraichir, collectionId);
736
	}
736
	}
737
	
737
	
738
	public void ajouterCollectionAPublication(Rafraichissable vueARafraichir, String collectionId, CollectionAPublicationListe publicationsAjoutees) {
738
	public void ajouterCollectionAPublication(Rafraichissable vueARafraichir, String collectionId, CollectionAPublicationListe publicationsAjoutees) {
739
		if (publicationsAjoutees != null && publicationsAjoutees.size() > 0) {
739
		if (publicationsAjoutees != null && publicationsAjoutees.size() > 0) {
740
			for (Iterator<String> it = publicationsAjoutees.keySet().iterator(); it.hasNext();) {
740
			for (Iterator<String> it = publicationsAjoutees.keySet().iterator(); it.hasNext();) {
741
				modele.ajouterCollectionAPublication(vueARafraichir, collectionId, (CollectionAPublication) publicationsAjoutees.get(it.next()));
741
				modele.ajouterCollectionAPublication(vueARafraichir, collectionId, (CollectionAPublication) publicationsAjoutees.get(it.next()));
742
			}
742
			}
743
		}
743
		}
744
	}
744
	}
745
	
745
	
746
	public void modifierCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsModifiees) {
746
	public void modifierCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsModifiees) {
747
		if (publicationsModifiees != null && publicationsModifiees.size() > 0) {
747
		if (publicationsModifiees != null && publicationsModifiees.size() > 0) {
748
			for (Iterator<String> it = publicationsModifiees.keySet().iterator(); it.hasNext();) {
748
			for (Iterator<String> it = publicationsModifiees.keySet().iterator(); it.hasNext();) {
749
				modele.modifierCollectionAPublication(vueARafraichir, (CollectionAPublication) publicationsModifiees.get(it.next()));
749
				modele.modifierCollectionAPublication(vueARafraichir, (CollectionAPublication) publicationsModifiees.get(it.next()));
750
			}
750
			}
751
		}
751
		}
752
	}
752
	}
753
	
753
	
754
	public void supprimerCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsSupprimees) {
754
	public void supprimerCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsSupprimees) {
755
		if (publicationsSupprimees != null && publicationsSupprimees.size() > 0) {
755
		if (publicationsSupprimees != null && publicationsSupprimees.size() > 0) {
756
			String idCollectionAPublicationSeparesParVirgule = "" ;
756
			String idCollectionAPublicationSeparesParVirgule = "" ;
757
			for (Iterator<String> it = publicationsSupprimees.keySet().iterator(); it.hasNext();) {
757
			for (Iterator<String> it = publicationsSupprimees.keySet().iterator(); it.hasNext();) {
758
				idCollectionAPublicationSeparesParVirgule += publicationsSupprimees.get(it.next()).getId();
758
				idCollectionAPublicationSeparesParVirgule += publicationsSupprimees.get(it.next()).getId();
759
				if (it.hasNext()) {
759
				if (it.hasNext()) {
760
					idCollectionAPublicationSeparesParVirgule += ",";
760
					idCollectionAPublicationSeparesParVirgule += ",";
761
				}
761
				}
762
			}
762
			}
763
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionAPublicationSeparesParVirgule);
763
			modele.supprimerCollectionAPublication(vueARafraichir, idCollectionAPublicationSeparesParVirgule);
764
		}
764
		}
765
	}
765
	}
766
	
766
 
767
	//+----------------------------------------------------------------------------------------------------------------+
-
 
768
	// GESTION de la relation COLLECTION A PUBLICATION
-
 
769
	
-
 
770
	//+----------------------------------------------------------------------------------------------------------------+
767
	//+----------------------------------------------------------------------------------------------------------------+
771
	// GESTION de la relation COLLECTION A COMMENTAIRE
768
	// GESTION de la relation COLLECTION A COMMENTAIRE
772
	
769
	
773
	//+----------------------------------------------------------------------------------------------------------------+
770
	//+----------------------------------------------------------------------------------------------------------------+
774
	//												GESTION DES PERSONNES
771
	//												GESTION DES PERSONNES
775
	//+----------------------------------------------------------------------------------------------------------------+
772
	//+----------------------------------------------------------------------------------------------------------------+
776
 
773
 
777
	public void afficherListePersonnes(PersonneListe personnesACharger)	{
774
	public void afficherListePersonnes(PersonneListe personnesACharger)	{
778
		if (!(panneauCentre.getContenu() instanceof PersonneVue))	{
775
		if (!(panneauCentre.getContenu() instanceof PersonneVue))	{
779
			panneauCentre.removeAll();
776
			panneauCentre.removeAll();
780
			panneauCentre.add(new PersonneVue(this));
777
			panneauCentre.add(new PersonneVue(this));
781
			panneauCentre.setId(ComposantId.PANNEAU_PERSONNE_LISTES);
778
			panneauCentre.setId(ComposantId.PANNEAU_PERSONNE_LISTES);
782
		}	
779
		}	
783
		
780
		
784
		panneauCentre.getContenu().rafraichir(personnesACharger);
781
		panneauCentre.getContenu().rafraichir(personnesACharger);
785
	}
782
	}
786
	
783
	
787
	public void afficherFormPersonne(String personneId)	{
784
	public void afficherFormPersonne(String personneId)	{
788
		panneauCentre.removeAll();
785
		panneauCentre.removeAll();
789
		PersonneForm personneForm = new PersonneForm(this, personneId);
786
		PersonneForm personneForm = new PersonneForm(this, personneId);
790
		panneauCentre.add(personneForm);
787
		panneauCentre.add(personneForm);
791
		
788
		
792
		panneauCentre.layout();
789
		panneauCentre.layout();
793
	}
790
	}
794
 
791
 
795
	public void clicListePersonne(Personne personne)	{
792
	public void clicListePersonne(Personne personne)	{
796
		panneauCentre.getContenu().rafraichir(personne);
793
		panneauCentre.getContenu().rafraichir(personne);
797
	}
794
	}
798
 
795
 
799
	public void clicAjouterPersonne()	{
796
	public void clicAjouterPersonne()	{
800
		afficherFormPersonne(null);
797
		afficherFormPersonne(null);
801
	}
798
	}
802
	
799
	
803
	public void clicModifierPersonne(List<Personne> selection)	{
800
	public void clicModifierPersonne(List<Personne> selection)	{
804
		if (selection.size() == 0) {
801
		if (selection.size() == 0) {
805
			Info.display("Information", "Veuillez sélectionner une personne.");
802
			Info.display("Information", "Veuillez sélectionner une personne.");
806
		} else if (selection.size() > 1) {
803
		} else if (selection.size() > 1) {
807
			Info.display("Information", "Veuillez sélectionner une seule personne à la fois.");
804
			Info.display("Information", "Veuillez sélectionner une seule personne à la fois.");
808
		} else if (selection.size() == 1) {
805
		} else if (selection.size() == 1) {
809
			afficherFormPersonne(selection.get(0).getId());
806
			afficherFormPersonne(selection.get(0).getId());
810
		} else {
807
		} else {
811
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
808
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
812
		}			
809
		}			
813
	}
810
	}
814
	
811
	
815
	
812
	
816
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
813
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
817
		//Empecher suppression utilisateur
814
		//Empecher suppression utilisateur
818
		for (int i=0; i < personneSelection.size(); i++)	{
815
		for (int i=0; i < personneSelection.size(); i++)	{
819
			Personne courante = personneSelection.get(i);
816
			Personne courante = personneSelection.get(i);
820
			if (courante.getId().equals(getUtilisateurId()))	{
817
			if (courante.getId().equals(getUtilisateurId()))	{
821
				Info.display("Information", "Vous ne pouvez pas supprimer votre compte");
818
				Info.display("Information", "Vous ne pouvez pas supprimer votre compte");
822
				personneSelection.remove(courante);
819
				personneSelection.remove(courante);
823
			}
820
			}
824
		}
821
		}
825
		
822
		
826
		if (personneSelection.size() == 0) {
823
		if (personneSelection.size() == 0) {
827
			Info.display("Information", "Veuillez sélectionner une personne.");
824
			Info.display("Information", "Veuillez sélectionner une personne.");
828
		} else if(personneSelection.size() > 0) {
825
		} else if(personneSelection.size() > 0) {
829
			String message = "Êtes vous sur de vouloir supprimer les personnes sélectionnées ?";
826
			String message = "Êtes vous sur de vouloir supprimer les personnes sélectionnées ?";
830
			if (personneSelection.size() == 1) {
827
			if (personneSelection.size() == 1) {
831
				message = "Êtes vous sur de vouloir supprimer la personne sélectionnée ?";
828
				message = "Êtes vous sur de vouloir supprimer la personne sélectionnée ?";
832
			}
829
			}
833
			
830
			
834
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
831
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
835
				public void handleEvent(MessageBoxEvent ce) {
832
				public void handleEvent(MessageBoxEvent ce) {
836
					Dialog dialog = (Dialog) ce.getComponent();
833
					Dialog dialog = (Dialog) ce.getComponent();
837
					Button btn = ce.getButtonClicked();
834
					Button btn = ce.getButtonClicked();
838
 
835
 
839
					if (btn.getText().equals(dialog.yesText)) {
836
					if (btn.getText().equals(dialog.yesText)) {
840
						String idPersonneSepareParVirgule = "" ;
837
						String idPersonneSepareParVirgule = "" ;
841
						Iterator<Personne> itPersonne = personneSelection.iterator();
838
						Iterator<Personne> itPersonne = personneSelection.iterator();
842
						while (itPersonne.hasNext()) {
839
						while (itPersonne.hasNext()) {
843
							Personne personneCourante = itPersonne.next();
840
							Personne personneCourante = itPersonne.next();
844
							idPersonneSepareParVirgule += personneCourante.getId();
841
							idPersonneSepareParVirgule += personneCourante.getId();
845
							idPersonneSepareParVirgule +=",";
842
							idPersonneSepareParVirgule +=",";
846
						}
843
						}
847
						modele.supprimerPersonne(vue, idPersonneSepareParVirgule);  
844
						modele.supprimerPersonne(vue, idPersonneSepareParVirgule);  
848
					}
845
					}
849
				}
846
				}
850
			};
847
			};
851
			
848
			
852
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
849
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
853
		} else {
850
		} else {
854
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
851
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
855
		}
852
		}
856
	}
853
	}
857
 
854
 
858
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId)	{
855
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId)	{
859
		int nbElements = Integer.valueOf(((Dictionary) Dictionary.getDictionary("configuration")).get("nbElementsPage")); 
856
		int nbElements = Integer.valueOf(((Dictionary) Dictionary.getDictionary("configuration")).get("nbElementsPage")); 
860
		selectionnerPersonne(vueARafraichir, personne, projetId, 0, nbElements);
857
		selectionnerPersonne(vueARafraichir, personne, projetId, 0, nbElements);
861
	}
858
	}
862
	
859
	
863
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId, int start, int nbElements)	{
860
	public void selectionnerPersonne(Rafraichissable vueARafraichir, Personne personne, String projetId, int start, int nbElements)	{
864
		String personneId = null;
861
		String personneId = null;
865
		if (personne != null)	{
862
		if (personne != null)	{
866
			personneId = personne.getId();
863
			personneId = personne.getId();
867
		}
864
		}
868
		modele.selectionnerPersonne(vueARafraichir, personneId, projetId, null, start, nbElements);
865
		modele.selectionnerPersonne(vueARafraichir, personneId, projetId, null, start, nbElements);
869
	}
866
	}
870
	
867
	
871
	public void selectionnerPersonneParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
868
	public void selectionnerPersonneParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
872
		modele.selectionnerPersonne(vueARafraichir, null, projetId, nomComplet, 0, -1);		
869
		modele.selectionnerPersonne(vueARafraichir, null, projetId, nomComplet, 0, -1);		
873
	}
870
	}
874
	
871
	
875
	public void selectionnerPersonneParProjet(Rafraichissable vueARafraichir, String projetId) {
872
	public void selectionnerPersonneParProjet(Rafraichissable vueARafraichir, String projetId) {
876
		modele.selectionnerPersonne(vueARafraichir, null, projetId, null, 0, -1);		
873
		modele.selectionnerPersonne(vueARafraichir, null, projetId, null, 0, -1);		
877
	}
874
	}
878
	
875
	
879
	public void enregistrerPersonne(Rafraichissable vue, Personne personne){
876
	public void enregistrerPersonne(Rafraichissable vue, Personne personne){
880
		if (personne.getId() != null && !personne.getId().trim().equals("")) {	
877
		if (personne.getId() != null && !personne.getId().trim().equals("")) {	
881
			modele.modifierPersonne(vue, personne);
878
			modele.modifierPersonne(vue, personne);
882
		}	else {
879
		}	else {
883
			modele.ajouterPersonne(vue, personne);
880
			modele.ajouterPersonne(vue, personne);
884
		}
881
		}
885
	}
882
	}
886
	
883
	
887
	//+----------------------------------------------------------------------------------------------------------------+
884
	//+----------------------------------------------------------------------------------------------------------------+
888
	//												GESTION DES PUBLICATIONS
885
	//												GESTION DES PUBLICATIONS
889
	//+----------------------------------------------------------------------------------------------------------------+
886
	//+----------------------------------------------------------------------------------------------------------------+
890
 
887
 
891
	public void afficherListePublication(PublicationListe nouvelleDonnees) {
888
	public void afficherListePublication(PublicationListe nouvelleDonnees) {
892
		if (!(panneauCentre.getContenu() instanceof PublicationVue))	{
889
		if (!(panneauCentre.getContenu() instanceof PublicationVue))	{
893
			panneauCentre.removeAll();
890
			panneauCentre.removeAll();
894
			panneauCentre.add(new PublicationVue(this));
891
			panneauCentre.add(new PublicationVue(this));
895
		}	
892
		}	
896
		
893
		
897
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
894
		panneauCentre.getContenu().rafraichir(nouvelleDonnees);	
898
	}
895
	}
899
	
896
	
900
	public void afficherFormPublication(String publicationId) {
897
	public void afficherFormPublication(String publicationId) {
901
		panneauCentre.removeAll();
898
		panneauCentre.removeAll();
902
		PublicationForm publicationForm = new PublicationForm(this, publicationId);
899
		PublicationForm publicationForm = new PublicationForm(this, publicationId);
903
		panneauCentre.add(publicationForm);
900
		panneauCentre.add(publicationForm);
904
		
901
		
905
		panneauCentre.layout();
902
		panneauCentre.layout();
906
	}
903
	}
907
	
904
	
908
	public void clicListePublication(Publication publication) {
905
	public void clicListePublication(Publication publication) {
909
		if (publication != null) {
906
		if (publication != null) {
910
			panneauCentre.getContenu().rafraichir(publication);	
907
			panneauCentre.getContenu().rafraichir(publication);	
911
		}
908
		}
912
	}
909
	}
913
 
910
 
914
	public void clicAjouterPublication() {
911
	public void clicAjouterPublication() {
915
		afficherFormPublication(null);
912
		afficherFormPublication(null);
916
	}
913
	}
917
	
914
	
918
	public void clicModifierPublication(List<Publication> selection) {
915
	public void clicModifierPublication(List<Publication> selection) {
919
		if (selection.size() == 0) {
916
		if (selection.size() == 0) {
920
			Info.display("Information", "Veuillez sélectionner une publication.");
917
			Info.display("Information", "Veuillez sélectionner une publication.");
921
		} else if (selection.size() > 1) {
918
		} else if (selection.size() > 1) {
922
			Info.display("Information", "Veuillez sélectionner une seule publication à la fois.");
919
			Info.display("Information", "Veuillez sélectionner une seule publication à la fois.");
923
		} else if (selection.size() == 1) {
920
		} else if (selection.size() == 1) {
924
			afficherFormPublication(selection.get(0).getId());
921
			afficherFormPublication(selection.get(0).getId());
925
		} else {
922
		} else {
926
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
923
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
927
		}
924
		}
928
	}
925
	}
929
	
926
	
930
	public void clicSupprimerPublication(final List<Publication> publicationListe) {
927
	public void clicSupprimerPublication(final List<Publication> publicationListe) {
931
		if (publicationListe.size() <= 0) {
928
		if (publicationListe.size() <= 0) {
932
			MessageBox.alert("Attention", "Vous devez sélectionner une publication", null); 
929
			MessageBox.alert("Attention", "Vous devez sélectionner une publication", null); 
933
		} else {
930
		} else {
934
			String message = "Voulez-vous vraiment supprimer ces publications ?";
931
			String message = "Voulez-vous vraiment supprimer ces publications ?";
935
			if (publicationListe.size() == 1) {
932
			if (publicationListe.size() == 1) {
936
				message = "Voulez-vous vraiment supprimer cette publication ?";
933
				message = "Voulez-vous vraiment supprimer cette publication ?";
937
			}
934
			}
938
			
935
			
939
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
936
			final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { 
940
				public void handleEvent(MessageBoxEvent ce) {  
937
				public void handleEvent(MessageBoxEvent ce) {  
941
					Dialog dialog = (Dialog) ce.getComponent();
938
					Dialog dialog = (Dialog) ce.getComponent();
942
				    Button btn = ce.getButtonClicked();  
939
				    Button btn = ce.getButtonClicked();  
943
				    	   
940
				    	   
944
				    if (btn.getText().equals(dialog.yesText)) {
941
				    if (btn.getText().equals(dialog.yesText)) {
945
				    	supprimerPublication(panneauCentre.getContenu(), publicationListe);
942
				    	supprimerPublication(panneauCentre.getContenu(), publicationListe);
946
				    	supprimerPublicationAPersonne(panneauCentre.getContenu(), publicationListe.get(0).getId());
943
				    	supprimerPublicationAPersonne(panneauCentre.getContenu(), publicationListe.get(0).getId());
947
				    }
944
				    }
948
				}
945
				}
949
			};
946
			};
950
				     
947
				     
951
			MessageBox.confirm("Supprimer une publication", message, listenerSuppression);
948
			MessageBox.confirm("Supprimer une publication", message, listenerSuppression);
952
		}
949
		}
953
	}
950
	}
954
	
951
	
955
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId) {
952
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId) {
956
		modele.selectionnerPublication(vueARafraichir, publicationId, getProjetId(), null);
953
		modele.selectionnerPublication(vueARafraichir, publicationId, getProjetId(), null);
957
	}
954
	}
958
	
955
	
959
	public void selectionnerPublicationParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
956
	public void selectionnerPublicationParNomComplet(Rafraichissable vueARafraichir, String projetId, String nomComplet) {
960
		modele.selectionnerPublication(vueARafraichir, null, projetId, nomComplet);		
957
		modele.selectionnerPublication(vueARafraichir, null, projetId, nomComplet);		
961
	}
958
	}
962
	
959
	
963
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication) {
960
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication) {
964
		modele.ajouterPublication(vueARafraichir, publication);
961
		modele.ajouterPublication(vueARafraichir, publication);
965
	}
962
	}
966
	
963
	
967
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
964
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
968
		modele.modifierPublication(vueARafraichir, publication);
965
		modele.modifierPublication(vueARafraichir, publication);
969
	}
966
	}
970
	
967
	
971
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
968
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
972
		if (publicationsListe != null && publicationsListe.size() > 0) {
969
		if (publicationsListe != null && publicationsListe.size() > 0) {
973
			String idPublicationSeparesParVirgule = "" ;
970
			String idPublicationSeparesParVirgule = "" ;
974
			Iterator<Publication> it = publicationsListe.iterator();
971
			Iterator<Publication> it = publicationsListe.iterator();
975
			while (it.hasNext()) {
972
			while (it.hasNext()) {
976
				idPublicationSeparesParVirgule += it.next().getId();
973
				idPublicationSeparesParVirgule += it.next().getId();
977
				if (it.hasNext()) {
974
				if (it.hasNext()) {
978
					idPublicationSeparesParVirgule += ",";
975
					idPublicationSeparesParVirgule += ",";
979
				}
976
				}
980
			}
977
			}
981
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
978
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
982
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
979
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
983
		}
980
		}
984
	}
981
	}
985
 
982
 
986
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
983
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
987
		selectionnerStructureParProjet(vueARafraichir, null);
984
		selectionnerStructureParProjet(vueARafraichir, null);
988
	}
985
	}
989
 
986
 
990
	public void clicObtenirListeAuteurs(Rafraichissable vueARafraichir) {
987
	public void clicObtenirListeAuteurs(Rafraichissable vueARafraichir) {
991
		selectionnerPersonneParProjet(vueARafraichir, null);
988
		selectionnerPersonneParProjet(vueARafraichir, null);
992
	}
989
	}
993
	
990
	
994
	//+----------------------------------------------------------------------------------------------------------------+
991
	//+----------------------------------------------------------------------------------------------------------------+
995
	// GESTION de la relation PUBLICATION A PERSONNE
992
	// GESTION de la relation PUBLICATION A PERSONNE
996
 
993
 
997
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
994
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
998
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
995
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
999
	}
996
	}
1000
	
997
	
1001
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
998
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
1002
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
999
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
1003
			String idPublicationAPersonneSepareParVirgule = "" ;
1000
			String idPublicationAPersonneSepareParVirgule = "" ;
1004
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1001
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1005
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1002
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1006
				if (it.hasNext()) {
1003
				if (it.hasNext()) {
1007
					idPublicationAPersonneSepareParVirgule += ",";
1004
					idPublicationAPersonneSepareParVirgule += ",";
1008
				}
1005
				}
1009
			}
1006
			}
1010
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
1007
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
1011
		}
1008
		}
1012
	}
1009
	}
1013
	
1010
	
1014
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1011
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1015
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1012
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1016
			String idPublicationAPersonneSepareParVirgule = "" ;
1013
			String idPublicationAPersonneSepareParVirgule = "" ;
1017
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1014
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1018
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1015
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1019
				if (it.hasNext()) {
1016
				if (it.hasNext()) {
1020
					idPublicationAPersonneSepareParVirgule += ",";
1017
					idPublicationAPersonneSepareParVirgule += ",";
1021
				}
1018
				}
1022
			}
1019
			}
1023
			supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
1020
			supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
1024
		}
1021
		}
1025
	}
1022
	}
1026
	
1023
	
1027
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, String idPublicationSeparesParVirgule) {
1024
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, String idPublicationSeparesParVirgule) {
1028
		modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1025
		modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1029
	}
1026
	}
1030
	
1027
	
1031
	//+----------------------------------------------------------------------------------------------------------------+
1028
	//+----------------------------------------------------------------------------------------------------------------+
1032
	//												RAFRAICHISSEMENT
1029
	//												RAFRAICHISSEMENT
1033
	//+----------------------------------------------------------------------------------------------------------------+
1030
	//+----------------------------------------------------------------------------------------------------------------+
1034
	
1031
	
1035
	public void rafraichir(Object nouvellesDonnees) {
1032
	public void rafraichir(Object nouvellesDonnees) {
1036
		if (nouvellesDonnees instanceof Utilisateur) {
1033
		if (nouvellesDonnees instanceof Utilisateur) {
1037
			repandreEtatIdentification((Utilisateur) nouvellesDonnees);
1034
			repandreEtatIdentification((Utilisateur) nouvellesDonnees);
1038
		} else if (nouvellesDonnees instanceof Information) {
1035
		} else if (nouvellesDonnees instanceof Information) {
1039
			Information info = (Information) nouvellesDonnees;
1036
			Information info = (Information) nouvellesDonnees;
1040
			if (info.getType().equals("modification_personne")) {
1037
			if (info.getType().equals("modification_personne")) {
1041
				repandreInfoMiseAJourUtilisateur();
1038
				repandreInfoMiseAJourUtilisateur();
1042
			}
1039
			}
1043
		} else {
1040
		} else {
1044
			GWT.log(i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
1041
			GWT.log(i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
1045
		}
1042
		}
1046
	}
1043
	}
1047
	
1044
	
1048
	//+----------------------------------------------------------------------------------------------------------------+
1045
	//+----------------------------------------------------------------------------------------------------------------+
1049
	//												GESTION du STATUT
1046
	//												GESTION du STATUT
1050
	//+----------------------------------------------------------------------------------------------------------------+
1047
	//+----------------------------------------------------------------------------------------------------------------+
1051
	
1048
	
1052
	public void afficherPopinChargement()	{
1049
	public void afficherPopinChargement()	{
1053
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).center();
1050
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).center();
1054
	}
1051
	}
1055
		
1052
		
1056
	public void masquerPopinChargement()	{		
1053
	public void masquerPopinChargement()	{		
1057
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).hide();
1054
		((PopupChargement) Registry.get(RegistreId.POPUP_CHARGEMENT)).hide();
1058
	}
1055
	}
1059
 
1056
 
1060
}
1057
}