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