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