Subversion Repositories eFlore/Applications.coel

Rev

Rev 1197 | Rev 1227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1197 Rev 1210
Line 3... Line 3...
3
import java.util.Iterator;
3
import java.util.Iterator;
4
import java.util.List;
4
import java.util.List;
Line 5... Line 5...
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.InfoLogger;
8
import org.tela_botanica.client.composants.LicenceFenetre;
9
import org.tela_botanica.client.composants.LicenceFenetre;
9
import org.tela_botanica.client.composants.AproposFenetre;
10
import org.tela_botanica.client.composants.AproposFenetre;
10
import org.tela_botanica.client.configuration.APropos;
11
import org.tela_botanica.client.configuration.APropos;
11
import org.tela_botanica.client.configuration.Configuration;
12
import org.tela_botanica.client.configuration.Configuration;
Line 43... Line 44...
43
import org.tela_botanica.client.modeles.structure.StructureValorisation;
44
import org.tela_botanica.client.modeles.structure.StructureValorisation;
44
import org.tela_botanica.client.util.Debug;
45
import org.tela_botanica.client.util.Debug;
45
import org.tela_botanica.client.vues.ContenuVue;
46
import org.tela_botanica.client.vues.ContenuVue;
46
import org.tela_botanica.client.vues.EnteteVue;
47
import org.tela_botanica.client.vues.EnteteVue;
47
import org.tela_botanica.client.vues.Formulaire;
48
import org.tela_botanica.client.vues.Formulaire;
-
 
49
import org.tela_botanica.client.vues.FenetreJournal;
48
import org.tela_botanica.client.vues.NavigationVue;
50
import org.tela_botanica.client.vues.NavigationVue;
49
import org.tela_botanica.client.vues.PopupChargement;
51
import org.tela_botanica.client.vues.PopupChargement;
50
import org.tela_botanica.client.vues.StatutVue;
52
import org.tela_botanica.client.vues.StatutVue;
51
import org.tela_botanica.client.vues.accueil.AccueilVue;
53
import org.tela_botanica.client.vues.accueil.AccueilVue;
52
import org.tela_botanica.client.vues.collection.CollectionForm;
54
import org.tela_botanica.client.vues.collection.CollectionForm;
Line 61... Line 63...
61
import org.tela_botanica.client.vues.publication.PublicationForm;
63
import org.tela_botanica.client.vues.publication.PublicationForm;
62
import org.tela_botanica.client.vues.publication.PublicationVue;
64
import org.tela_botanica.client.vues.publication.PublicationVue;
63
import org.tela_botanica.client.vues.structure.StructureForm;
65
import org.tela_botanica.client.vues.structure.StructureForm;
64
import org.tela_botanica.client.vues.structure.StructureVue;
66
import org.tela_botanica.client.vues.structure.StructureVue;
Line -... Line 67...
-
 
67
 
65
 
68
import com.extjs.gxt.ui.client.GXT;
66
import com.extjs.gxt.ui.client.Registry;
69
import com.extjs.gxt.ui.client.Registry;
67
import com.extjs.gxt.ui.client.Style.LayoutRegion;
70
import com.extjs.gxt.ui.client.Style.LayoutRegion;
68
import com.extjs.gxt.ui.client.event.Listener;
71
import com.extjs.gxt.ui.client.event.Listener;
69
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
72
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
Line 73... Line 76...
73
import com.extjs.gxt.ui.client.widget.MessageBox;
76
import com.extjs.gxt.ui.client.widget.MessageBox;
74
import com.extjs.gxt.ui.client.widget.Viewport;
77
import com.extjs.gxt.ui.client.widget.Viewport;
75
import com.extjs.gxt.ui.client.widget.button.Button;
78
import com.extjs.gxt.ui.client.widget.button.Button;
76
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
79
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
77
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
80
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
-
 
81
import com.gargoylesoftware.htmlunit.AlertHandler;
78
import com.google.gwt.core.client.GWT;
82
import com.google.gwt.core.client.GWT;
79
import com.google.gwt.i18n.client.Dictionary;
83
import com.google.gwt.i18n.client.Dictionary;
80
import com.google.gwt.user.client.Window;
84
import com.google.gwt.user.client.Window;
81
import com.google.gwt.user.client.ui.RootPanel;
85
import com.google.gwt.user.client.ui.RootPanel;
Line 89... Line 93...
89
	
93
	
90
	private EnteteVue panneauNord = null;
94
	private EnteteVue panneauNord = null;
91
	private NavigationVue panneauOuest = null;
95
	private NavigationVue panneauOuest = null;
92
	private ContenuVue panneauCentre = null;
96
	private ContenuVue panneauCentre = null;
-
 
97
	private StatutVue panneauSud = null;
Line 93... Line 98...
93
	private StatutVue panneauSud = null;
98
	private FenetreJournal fenetreJournal = null;
94
	
99
	
Line 95... Line 100...
95
	private IdentificationFenetre fenetreIdentification = null;
100
	private IdentificationFenetre fenetreIdentification = null;
Line 112... Line 117...
112
		// Création des différents panneaux
117
		// Création des différents panneaux
113
	    creerPanneauNord();
118
	    creerPanneauNord();
114
	    creerPanneauOuest();
119
	    creerPanneauOuest();
115
	    creerPanneauCentral();
120
	    creerPanneauCentral();
116
	    creerPanneauSud();
121
	    creerPanneauSud();
-
 
122
	    fenetreJournal = new FenetreJournal(this);
Line 117... Line 123...
117
		
123
		
118
		// Connection de l'utilisateur
124
		// Connection de l'utilisateur
Line 119... Line 125...
119
		connecterUtilisateur(null, null);
125
		connecterUtilisateur(null, null);
Line 204... Line 210...
204
 
210
 
205
	public void actualiserPanneauCentral() {
211
	public void actualiserPanneauCentral() {
206
		panneauCentre.layout();
212
		panneauCentre.layout();
Line -... Line 213...
-
 
213
	}
-
 
214
	
-
 
215
	public Rafraichissable obtenirFenetreJournal()	{
-
 
216
		return this.fenetreJournal;
-
 
217
	}
-
 
218
	
-
 
219
	public void ouvrirFenetreJournal()	{
-
 
220
		fenetreJournal.show();
-
 
221
	}
-
 
222
	
-
 
223
	public StatutVue obtenirPanneauSud()	{
-
 
224
		return this.panneauSud;
207
	}
225
	}
208
	
226
	
209
	//+----------------------------------------------------------------------------------------------------------------+
227
	//+----------------------------------------------------------------------------------------------------------------+
Line 210... Line 228...
210
	//												GESTION du MENU
228
	//												GESTION du MENU
-
 
229
	//+----------------------------------------------------------------------------------------------------------------+
211
	//+----------------------------------------------------------------------------------------------------------------+
230
	
212
	
231
	public void clicMenu(String codeMenuClique) {
-
 
232
		
213
	public void clicMenu(String codeMenuClique) {
233
		activerChargement(codeMenuClique);
214
		activerChargement(codeMenuClique);
234
		panneauOuest.getMenu().selectionMenu(codeMenuClique);
215
		panneauOuest.getMenu().selectionMenu(codeMenuClique);
235
		
216
		if (codeMenuClique.equals(MenuApplicationId.ACCUEIL)) {
236
		if (codeMenuClique.equals(MenuApplicationId.ACCUEIL)) {		
217
			afficherAccueil();
237
			afficherAccueil();
218
		} else if (codeMenuClique.equals(MenuApplicationId.PROJET)) {
238
		} else if (codeMenuClique.equals(MenuApplicationId.PROJET)) {
Line 363... Line 383...
363
	//+----------------------------------------------------------------------------------------------------------------+
383
	//+----------------------------------------------------------------------------------------------------------------+
364
	//												GESTION des APPLETS de l'ACCUEIL
384
	//												GESTION des APPLETS de l'ACCUEIL
365
	//+----------------------------------------------------------------------------------------------------------------+
385
	//+----------------------------------------------------------------------------------------------------------------+
Line 366... Line 386...
366
	
386
	
367
	public void afficherAccueil() {
387
	public void afficherAccueil() {
368
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {
388
		if (!(panneauCentre.getContenu() instanceof AccueilVue)) {				
369
			panneauCentre.removeAll();
389
			panneauCentre.removeAll();
370
			panneauCentre.add(new AccueilVue(this));
390
			panneauCentre.add(new AccueilVue(this));
-
 
391
		}
-
 
392
		else {
-
 
393
			desactiverChargement();
371
		}
394
		}
Line 372... Line 395...
372
	}
395
	}
373
	
396
	
374
	//+----------------------------------------------------------------------------------------------------------------+
397
	//+----------------------------------------------------------------------------------------------------------------+
Line 432... Line 455...
432
		
455
		
Line 433... Line 456...
433
	}
456
	}
434
 
457
 
435
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
458
	public void clicModifierProjet(List<Projet> projetsSelectionnes) {
436
		if (projetsSelectionnes.size() == 0) {
459
		if (projetsSelectionnes.size() == 0) {
437
			Info.display("Information", "Veuillez sélectionner un projet.");
460
			InfoLogger.display("Information", "Veuillez sélectionner un projet.");
438
		} else if (projetsSelectionnes.size() > 1) {
461
		} else if (projetsSelectionnes.size() > 1) {
439
			Info.display("Information", "Veuillez sélectionner un seul projet à la fois.");
462
			InfoLogger.display("Information", "Veuillez sélectionner un seul projet à la fois.");
440
		} else if (projetsSelectionnes.size() == 1) {
463
		} else if (projetsSelectionnes.size() == 1) {
441
			afficherFormProjet(projetsSelectionnes.get(0).getId());
464
			afficherFormProjet(projetsSelectionnes.get(0).getId());
442
		} else {
465
		} else {
443
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierProjet() du Médiateur.");
466
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierProjet() du Médiateur.");
Line 444... Line 467...
444
		}
467
		}
445
	}
468
	}
Line 539... Line 562...
539
		afficherFormStructure(null);
562
		afficherFormStructure(null);
540
	}
563
	}
Line 541... Line 564...
541
	
564
	
542
	public void clicModifierStructure(List<Structure> structureSelection) {
565
	public void clicModifierStructure(List<Structure> structureSelection) {
543
		if (structureSelection.size() == 0) {
566
		if (structureSelection.size() == 0) {
544
			Info.display("Information", "Veuillez sélectionner une structure.");
567
			InfoLogger.display("Information", "Veuillez sélectionner une structure.");
545
		} else if (structureSelection.size() > 1) {
568
		} else if (structureSelection.size() > 1) {
546
			Info.display("Information", "Veuillez sélectionner une seule structure à la fois.");
569
			InfoLogger.display("Information", "Veuillez sélectionner une seule structure à la fois.");
547
		} else if (structureSelection.size() == 1) {
570
		} else if (structureSelection.size() == 1) {
548
			afficherFormStructure(structureSelection.get(0).getId());
571
			afficherFormStructure(structureSelection.get(0).getId());
549
		} else {
572
		} else {
550
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierStructure() du Médiateur.");
573
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierStructure() du Médiateur.");
551
		}
574
		}
Line 552... Line 575...
552
	}
575
	}
553
	
576
	
554
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
577
	public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) {
555
		if (structureSelection.size() == 0) {
578
		if (structureSelection.size() == 0) {
556
			Info.display("Information", "Veuillez sélectionner une structure.");
579
			InfoLogger.display("Information", "Veuillez sélectionner une structure.");
557
		} else if(structureSelection.size() > 0) {
580
		} else if(structureSelection.size() > 0) {
558
			String titre = "Supprimer des structures";
581
			String titre = "Supprimer des structures";
559
			String message = "Êtes vous sur de vouloir supprimer les structures sélectionnées ?";
582
			String message = "Êtes vous sur de vouloir supprimer les structures sélectionnées ?";
Line 577... Line 600...
577
				}
600
				}
578
			};
601
			};
Line 579... Line 602...
579
			
602
			
580
			MessageBox.confirm(titre, message, suppressionEcouteur);
603
			MessageBox.confirm(titre, message, suppressionEcouteur);
581
		} else {
604
		} else {
582
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerStructure() du Médiateur.");
605
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerStructure() du Médiateur.");
583
		}
606
		}
Line 584... Line 607...
584
	}
607
	}
585
	
608
	
Line 692... Line 715...
692
		afficherFormCollection(null);
715
		afficherFormCollection(null);
693
	}
716
	}
Line 694... Line 717...
694
 
717
 
695
	public void clicModifierCollection(List<Collection> selection) {
718
	public void clicModifierCollection(List<Collection> selection) {
696
		if (selection.size() == 0) {
719
		if (selection.size() == 0) {
697
			Info.display("Information", "Veuillez sélectionner une collection.");
720
			InfoLogger.display("Information", "Veuillez sélectionner une collection.");
698
		} else if (selection.size() > 1) {
721
		} else if (selection.size() > 1) {
699
			Info.display("Information", "Veuillez sélectionner une seule collection à la fois.");
722
			InfoLogger.display("Information", "Veuillez sélectionner une seule collection à la fois.");
700
		} else if (selection.size() == 1) {
723
		} else if (selection.size() == 1) {
701
			afficherFormCollection(selection.get(0).getId());
724
			afficherFormCollection(selection.get(0).getId());
702
		} else {
725
		} else {
703
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCollection() du Médiateur.");
726
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCollection() du Médiateur.");
704
		}
727
		}
Line 705... Line 728...
705
	}
728
	}
706
 
729
 
Line 903... Line 926...
903
		afficherFormPersonne(null);
926
		afficherFormPersonne(null);
904
	}
927
	}
Line 905... Line 928...
905
	
928
	
906
	public void clicModifierPersonne(List<Personne> selection)	{
929
	public void clicModifierPersonne(List<Personne> selection)	{
907
		if (selection.size() == 0) {
930
		if (selection.size() == 0) {
908
			Info.display("Information", "Veuillez sélectionner une personne.");
931
			InfoLogger.display("Information", "Veuillez sélectionner une personne.");
909
		} else if (selection.size() > 1) {
932
		} else if (selection.size() > 1) {
910
			Info.display("Information", "Veuillez sélectionner une seule personne à la fois.");
933
			InfoLogger.display("Information", "Veuillez sélectionner une seule personne à la fois.");
911
		} else if (selection.size() == 1) {
934
		} else if (selection.size() == 1) {
912
			afficherFormPersonne(selection.get(0).getId());
935
			afficherFormPersonne(selection.get(0).getId());
913
		} else {
936
		} else {
914
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
937
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPersonne() du Médiateur.");
915
		}			
938
		}			
Line 916... Line 939...
916
	}
939
	}
917
	
940
	
918
	
941
	
919
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
942
	public void clicSupprimerPersonne(final Rafraichissable vue, final List<Personne> personneSelection) {
920
		//Empecher suppression utilisateur
943
		//Empecher suppression utilisateur
921
		for (int i=0; i < personneSelection.size(); i++)	{
944
		for (int i=0; i < personneSelection.size(); i++)	{
922
			Personne courante = personneSelection.get(i);
945
			Personne courante = personneSelection.get(i);
923
			if (courante.getId().equals(getUtilisateurId()))	{
946
			if (courante.getId().equals(getUtilisateurId()))	{
924
				Info.display("Information", "Vous ne pouvez pas supprimer votre compte");
947
				InfoLogger.display("Information", "Vous ne pouvez pas supprimer votre compte");
Line 925... Line 948...
925
				personneSelection.remove(courante);
948
				personneSelection.remove(courante);
926
			}
949
			}
927
		}
950
		}
928
		
951
		
929
		if (personneSelection.size() == 0) {
952
		if (personneSelection.size() == 0) {
930
			Info.display("Information", "Veuillez sélectionner une personne.");
953
			InfoLogger.display("Information", "Veuillez sélectionner une personne.");
931
		} else if(personneSelection.size() > 0) {
954
		} else if(personneSelection.size() > 0) {
Line 952... Line 975...
952
				}
975
				}
953
			};
976
			};
Line 954... Line 977...
954
			
977
			
955
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
978
			MessageBox.confirm("Supprimer une personne", message, listenerSuppression);
956
		} else {
979
		} else {
957
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
980
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicSupprimerPersonne() du Médiateur.");
958
		}
981
		}
Line 959... Line 982...
959
	}
982
	}
960
 
983
 
Line 1019... Line 1042...
1019
		afficherFormPublication(null);
1042
		afficherFormPublication(null);
1020
	}
1043
	}
Line 1021... Line 1044...
1021
	
1044
	
1022
	public void clicModifierPublication(List<Publication> selection) {
1045
	public void clicModifierPublication(List<Publication> selection) {
1023
		if (selection.size() == 0) {
1046
		if (selection.size() == 0) {
1024
			Info.display("Information", "Veuillez sélectionner une publication.");
1047
			InfoLogger.display("Information", "Veuillez sélectionner une publication.");
1025
		} else if (selection.size() > 1) {
1048
		} else if (selection.size() > 1) {
1026
			Info.display("Information", "Veuillez sélectionner une seule publication à la fois.");
1049
			InfoLogger.display("Information", "Veuillez sélectionner une seule publication à la fois.");
1027
		} else if (selection.size() == 1) {
1050
		} else if (selection.size() == 1) {
1028
			afficherFormPublication(selection.get(0).getId());
1051
			afficherFormPublication(selection.get(0).getId());
1029
		} else {
1052
		} else {
1030
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
1053
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierPublication() du Médiateur.");
1031
		}
1054
		}
Line 1032... Line 1055...
1032
	}
1055
	}
1033
	
1056
	
Line 1074... Line 1097...
1074
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
1097
	public void modifierPublication(Rafraichissable vueARafraichir, Publication publication) {
1075
		modele.modifierPublication(vueARafraichir, publication);
1098
		modele.modifierPublication(vueARafraichir, publication);
1076
	}
1099
	}
Line 1077... Line 1100...
1077
	
1100
	
-
 
1101
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
-
 
1102
		
-
 
1103
Debug.log("(*) BEGIN Mediateur.supprimerPublication()");		
1078
	public void supprimerPublication(Rafraichissable vueARafraichir, List<Publication> publicationsListe) {
1104
		
1079
		if (publicationsListe != null && publicationsListe.size() > 0) {
1105
		if (publicationsListe != null && publicationsListe.size() > 0) {
1080
			String idPublicationSeparesParVirgule = "" ;
1106
			String idPublicationSeparesParVirgule = "" ;
1081
			Iterator<Publication> it = publicationsListe.iterator();
1107
			Iterator<Publication> it = publicationsListe.iterator();
1082
			while (it.hasNext()) {
1108
			while (it.hasNext()) {
Line 1086... Line 1112...
1086
				}
1112
				}
1087
			}
1113
			}
1088
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
1114
			modele.supprimerPublication(vueARafraichir, idPublicationSeparesParVirgule);
1089
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1115
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationSeparesParVirgule);
1090
		}
1116
		}
-
 
1117
		
-
 
1118
Debug.log("(*) END Mediateur.supprimerPublication()");
-
 
1119
 
1091
	}
1120
	}
Line 1092... Line 1121...
1092
 
1121
 
1093
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
1122
	public void clicObtenirListeEditeurs(Rafraichissable vueARafraichir) {
1094
		selectionnerStructureParProjet(vueARafraichir, null);
1123
		selectionnerStructureParProjet(vueARafraichir, null);
Line 1104... Line 1133...
1104
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
1133
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
1105
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
1134
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleId);
1106
	}
1135
	}
Line 1107... Line 1136...
1107
	
1136
	
-
 
1137
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List<Valeur> roleId) {
-
 
1138
		
-
 
1139
Debug.log("|*** BEGIN Mediateur.selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List<Valeur> roleId)");
1108
	public void selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List<Valeur> roleId) {
1140
		
1109
		String roleIds = "";
1141
		String roleIds = "";
1110
		Iterator<Valeur> itRole = roleId.iterator();
1142
		Iterator<Valeur> itRole = roleId.iterator();
1111
		while (itRole.hasNext())	{
1143
		while (itRole.hasNext())	{
1112
			roleIds+= itRole.next().getId();
1144
			roleIds+= itRole.next().getId();
1113
			if (itRole.hasNext())	{
1145
			if (itRole.hasNext())	{
1114
				roleIds+=",";
1146
				roleIds+=",";
1115
			}
1147
			}
1116
		}
1148
		}
-
 
1149
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleIds);
-
 
1150
 
1117
		modele.selectionPublicationAPersonne(vueARafraichir, publicationId, personnesId, roleIds);
1151
Debug.log("|*** END Mediateur.selectionnerPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, List<Valeur> roleId)");
Line 1118... Line 1152...
1118
	}
1152
	}
-
 
1153
	
-
 
1154
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
-
 
1155
 
1119
	
1156
Debug.log("|*** BEGIN Mediateur.ajouterPublicationAPersonne()");
1120
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, PublicationAPersonneListe personnesAjoutees, String roleId) {
1157
		
1121
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
1158
		if (personnesAjoutees != null && personnesAjoutees.size() > 0) {
1122
			String idPublicationAPersonneSepareParVirgule = "" ;
1159
			String idPublicationAPersonneSepareParVirgule = "" ;
1123
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1160
			for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) {
1124
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1161
				idPublicationAPersonneSepareParVirgule += personnesAjoutees.get(it.next()).getIdPersonne();
1125
				if (it.hasNext()) {
1162
				if (it.hasNext()) {
1126
					idPublicationAPersonneSepareParVirgule += ",";
1163
					idPublicationAPersonneSepareParVirgule += ",";
1127
				}
1164
				}
1128
			}
1165
			}
-
 
1166
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
-
 
1167
		}
-
 
1168
		
1129
			modele.ajouterPublicationAPersonne(vueARafraichir, publicationId, idPublicationAPersonneSepareParVirgule, roleId);
1169
Debug.log("|*** END Mediateur.ajouterPublicationAPersonne()");		
Line 1130... Line 1170...
1130
		}
1170
		
-
 
1171
	}
-
 
1172
	
1131
	}
1173
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1132
	
1174
Debug.log("(*) BEGIN Mediateur.supprimerPublicationAPersonne()");
1133
	public void supprimerPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe personnesSupprimees) {
1175
		
1134
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1176
		if (personnesSupprimees != null && personnesSupprimees.size() > 0) {
1135
			String idPublicationAPersonneSepareParVirgule = "" ;
1177
			String idPublicationAPersonneSepareParVirgule = "" ;
1136
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1178
			for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) {
1137
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1179
				idPublicationAPersonneSepareParVirgule += personnesSupprimees.get(it.next()).getId();
1138
				if (it.hasNext()) {
1180
				if (it.hasNext()) {
1139
					idPublicationAPersonneSepareParVirgule += ",";
1181
					idPublicationAPersonneSepareParVirgule += ",";
1140
				}
1182
				}
-
 
1183
			}
1141
			}
1184
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
Line 1142... Line 1185...
1142
			modele.supprimerPublicationAPersonne(vueARafraichir, idPublicationAPersonneSepareParVirgule);
1185
		}
1143
		}
1186
Debug.log("(*) END Mediateur.supprimerPublicationAPersonne()");		
-
 
1187
	}
-
 
1188
	
-
 
1189
	//Lier plusieurs publication à une personne
-
 
1190
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe listePublications, String personneId, String roleId) {
-
 
1191
		
1144
	}
1192
Debug.log("<8-8> BEGIN Mediateur.ajouterPublicationAPersonne() pour lier plusieurs publication à une personne");
1145
	
1193
 
1146
	//Lier plusieurs publication à une personne
1194
Debug.log("<8-8> Mediateur.ajouterPublicationAPersonne(), listePublications = "+listePublications.toString());
1147
	public void ajouterPublicationAPersonne(Rafraichissable vueARafraichir, PublicationAPersonneListe listePublications, String personneId, String roleId) {
1195
		
1148
		if (listePublications!=null && listePublications.size()>0)	{
1196
		if (listePublications!=null && listePublications.size()>0)	{
Line 1154... Line 1202...
1154
				rolesIds += publi.getRole();
1202
				rolesIds += publi.getRole();
1155
				if (it.hasNext()) {
1203
				if (it.hasNext()) {
1156
					idsPubli += ",";
1204
					idsPubli += ",";
1157
					rolesIds += ",";
1205
					rolesIds += ",";
1158
				}
1206
				}
1159
			}			
1207
			}
-
 
1208
			
-
 
1209
Debug.log("<8-8> Mediateur.ajouterPublicationAPersonne(), idsPubli = "+idsPubli+", rolesIds = "+rolesIds);
-
 
1210
			
-
 
1211
Debug.log("<8-8> Médiateur.ajouterPublicationAPersonne(), Appel à modele.ajouterPublicationAPersonne()");			
1160
			modele.ajouterPublicationAPersonne(vueARafraichir, idsPubli, personneId, rolesIds);
1212
			modele.ajouterPublicationAPersonne(vueARafraichir, idsPubli, personneId, rolesIds);
1161
		}
1213
		}
-
 
1214
		
-
 
1215
Debug.log("<8-8> END Mediateur.ajouterPublicationAPersonne() pour lier plusieurs publication à une personne");			
1162
	}
1216
	}
Line 1163... Line 1217...
1163
	
1217
	
1164
	//+----------------------------------------------------------------------------------------------------------------+
1218
	//+----------------------------------------------------------------------------------------------------------------+
1165
	//												GESTION DES COMMENTAIRES
1219
	//												GESTION DES COMMENTAIRES
Line 1192... Line 1246...
1192
		afficherFormCommentaire(null);
1246
		afficherFormCommentaire(null);
1193
	}
1247
	}
Line 1194... Line 1248...
1194
	
1248
	
1195
	public void clicModifierCommentaire(List<Commentaire> selection) {
1249
	public void clicModifierCommentaire(List<Commentaire> selection) {
1196
		if (selection.size() == 0) {
1250
		if (selection.size() == 0) {
1197
			Info.display("Information", "Veuillez sélectionner un commentaire.");
1251
			InfoLogger.display("Information", "Veuillez sélectionner un commentaire.");
1198
		} else if (selection.size() > 1) {
1252
		} else if (selection.size() > 1) {
1199
			Info.display("Information", "Veuillez sélectionner un seul commentaire à la fois.");
1253
			InfoLogger.display("Information", "Veuillez sélectionner un seul commentaire à la fois.");
1200
		} else if (selection.size() == 1) {
1254
		} else if (selection.size() == 1) {
1201
			afficherFormCommentaire(selection.get(0).getId());
1255
			afficherFormCommentaire(selection.get(0).getId());
1202
		} else {
1256
		} else {
1203
			Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCommentaire() du Médiateur.");
1257
			InfoLogger.display("Erreur", "Une erreur est survenue dans la méthode clicModifierCommentaire() du Médiateur.");
1204
		}
1258
		}
Line 1205... Line 1259...
1205
	}
1259
	}
1206
	
1260