10,6 → 10,7 |
import org.tela_botanica.client.i18n.ErrorMessages; |
import org.tela_botanica.client.interfaces.Rafraichissable; |
import org.tela_botanica.client.modeles.Collection; |
import org.tela_botanica.client.modeles.CollectionAPersonne; |
import org.tela_botanica.client.modeles.CollectionListe; |
import org.tela_botanica.client.modeles.Configuration; |
import org.tela_botanica.client.modeles.Information; |
22,6 → 23,7 |
import org.tela_botanica.client.modeles.PublicationListe; |
import org.tela_botanica.client.modeles.Structure; |
import org.tela_botanica.client.modeles.StructureAPersonne; |
import org.tela_botanica.client.modeles.CollectionAPersonneListe; |
import org.tela_botanica.client.modeles.StructureAPersonneListe; |
import org.tela_botanica.client.modeles.StructureConservation; |
import org.tela_botanica.client.modeles.StructureListe; |
546,6 → 548,45 |
} |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION de la relation COLLECTION A PERSONNE |
|
public void selectionnerCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, String roleId) { |
modele.selectionnerCollectionAPersonne(vueARafraichir, collectionId, roleId); |
} |
|
public void ajouterCollectionAPersonne(Rafraichissable vueARafraichir, String collectionId, CollectionAPersonneListe personnesAjoutees) { |
if (personnesAjoutees != null && personnesAjoutees.size() > 0) { |
for (Iterator<String> it = personnesAjoutees.keySet().iterator(); it.hasNext();) { |
modele.ajouterCollectionAPersonne(vueARafraichir, collectionId, (CollectionAPersonne) personnesAjoutees.get(it.next())); |
} |
} |
} |
|
public void modifierCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesModifiees) { |
if (personnesModifiees != null && personnesModifiees.size() > 0) { |
for (Iterator<String> it = personnesModifiees.keySet().iterator(); it.hasNext();) { |
modele.modifierCollectionAPersonne(vueARafraichir, (CollectionAPersonne) personnesModifiees.get(it.next())); |
} |
} |
} |
|
public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPersonneListe personnesSupprimees) { |
if (personnesSupprimees != null && personnesSupprimees.size() > 0) { |
String idCollectionAPersonneSeparesParVirgule = "" ; |
for (Iterator<String> it = personnesSupprimees.keySet().iterator(); it.hasNext();) { |
idCollectionAPersonneSeparesParVirgule += personnesSupprimees.get(it.next()).getId()+"," ; |
} |
modele.supprimerCollectionAPersonne(vueARafraichir, idCollectionAPersonneSeparesParVirgule); |
} |
} |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION de la relation COLLECTION A PUBLICATION |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION de la relation COLLECTION A COMMENTAIRE |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION DES PERSONNES |
//+----------------------------------------------------------------------------------------------------------------+ |
|
572,23 → 613,15 |
} |
|
public void afficherPersonneForm(Personne personne) { |
String mode = ""; |
String personneId = null; |
if (personne != null) { |
mode = PersonneForm.MODE_MODIFIER; |
personneId = personne.getId(); |
} else { |
mode = PersonneForm.MODE_AJOUTER; |
} |
|
panneauCentre.removeAll(); |
PersonneForm formulairePersonneVue = new PersonneForm(this, mode, personneId); |
PublicationForm publicationForm = new PublicationForm(this, personneId); |
panneauCentre.add(publicationForm); |
|
if (mode.equals(PersonneForm.MODE_MODIFIER)) { |
selectionnerPersonne(formulairePersonneVue, personne, null); |
} |
|
panneauCentre.add(formulairePersonneVue); |
panneauCentre.layout(); |
} |
|