Subversion Repositories eFlore/Applications.coel

Rev

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

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