| Line 3... |
Line 3... |
| 3 |
import java.util.Iterator;
|
3 |
import java.util.Iterator;
|
| 4 |
import java.util.List;
|
4 |
import java.util.List;
|
| Line 5... |
Line 5... |
| 5 |
|
5 |
|
| 6 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
6 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| - |
|
7 |
import org.tela_botanica.client.modeles.Collection;
|
| 7 |
import org.tela_botanica.client.modeles.Collection;
|
8 |
import org.tela_botanica.client.modeles.CollectionAsyncDao;
|
| 8 |
import org.tela_botanica.client.modeles.Personne;
|
9 |
import org.tela_botanica.client.modeles.Personne;
|
| 9 |
import org.tela_botanica.client.modeles.PersonneAsyncDao;
|
10 |
import org.tela_botanica.client.modeles.PersonneAsyncDao;
|
| 10 |
import org.tela_botanica.client.modeles.ProjetAsyncDao;
|
11 |
import org.tela_botanica.client.modeles.ProjetAsyncDao;
|
| 11 |
import org.tela_botanica.client.modeles.Publication;
|
12 |
import org.tela_botanica.client.modeles.Publication;
|
| Line 79... |
Line 80... |
| 79 |
|
80 |
|
| 80 |
//+----------------------------------------------------------------------------------------------------------------+
|
81 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 81 |
// GESTION DES STRUCTURES
|
82 |
// GESTION DES STRUCTURES
|
| Line 82... |
Line 83... |
| 82 |
//+----------------------------------------------------------------------------------------------------------------+
|
83 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 83 |
|
84 |
|
| 84 |
public void obtenirListeStructures(Rafraichissable vue, String projetId) {
|
85 |
public void obtenirListeStructures(Rafraichissable vueARafraichir, String projetId) {
|
| 85 |
StructureAsyncDao sDao = new StructureAsyncDao();
|
86 |
StructureAsyncDao sDao = new StructureAsyncDao();
|
| Line 86... |
Line 87... |
| 86 |
sDao.selectionner(vue, projetId, "");
|
87 |
sDao.selectionner(vueARafraichir, projetId, "");
|
| 87 |
}
|
88 |
}
|
| 88 |
|
89 |
|
| 89 |
public void selectionnerStructure(Rafraichissable vue, String projetId, String structureId) {
|
90 |
public void selectionnerStructure(Rafraichissable vueARafraichir, String projetId, String structureId) {
|
| 90 |
// Gestion des données des tables coel_structure, coel_structure_conservation et coel_structure_valorisation
|
91 |
// Gestion des données des tables coel_structure, coel_structure_conservation et coel_structure_valorisation
|
| Line 91... |
Line 92... |
| 91 |
StructureAsyncDao sDao = new StructureAsyncDao();
|
92 |
StructureAsyncDao sDao = new StructureAsyncDao();
|
| 92 |
sDao.selectionner(vue, projetId, structureId);
|
93 |
sDao.selectionner(vueARafraichir, projetId, structureId);
|
| 93 |
}
|
94 |
}
|
| 94 |
|
95 |
|
| 95 |
/** Lance la creation d'une Structure
|
96 |
/** Lance la creation d'une Structure
|
| 96 |
* @param vue la vue demandant a être rafraichie
|
97 |
* @param vueARafraichir la vue demandant a être rafraichie
|
| 97 |
* @param structure les données de la structure
|
98 |
* @param structure les données de la structure
|
| 98 |
*/
|
99 |
*/
|
| Line 99... |
Line 100... |
| 99 |
public void ajouterStructure(Rafraichissable vue, String idUtilisateur, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
|
100 |
public void ajouterStructure(Rafraichissable vueARafraichir, String idUtilisateur, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
|
| 100 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
101 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
| 101 |
structureDao.ajouter(vue, idUtilisateur, structure, conservation, valorisation);
|
102 |
structureDao.ajouter(vueARafraichir, idUtilisateur, structure, conservation, valorisation);
|
| 102 |
}
|
103 |
}
|
| Line 103... |
Line 104... |
| 103 |
|
104 |
|
| 104 |
public void supprimerStructure(Rafraichissable vue, String idUtilisateur, String idStr) {
|
105 |
public void supprimerStructure(Rafraichissable vueARafraichir, String idUtilisateur, String idStr) {
|
| 105 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
106 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
| 106 |
structureDao.supprimer(vue, idUtilisateur, idStr);
|
107 |
structureDao.supprimer(vueARafraichir, idUtilisateur, idStr);
|
| Line 107... |
Line 108... |
| 107 |
}
|
108 |
}
|
| 108 |
|
109 |
|
| Line 109... |
Line 110... |
| 109 |
public void modifierStructure(Rafraichissable vue, String utilisateurId, String structureId, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
|
110 |
public void modifierStructure(Rafraichissable vueARafraichir, String utilisateurId, String structureId, Structure structure, StructureConservation conservation, StructureValorisation valorisation) {
|
| 110 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
111 |
StructureAsyncDao structureDao = new StructureAsyncDao();
|
| 111 |
structureDao.modifier(vue, utilisateurId, structureId, structure, conservation, valorisation);
|
112 |
structureDao.modifier(vueARafraichir, utilisateurId, structureId, structure, conservation, valorisation);
|
| 112 |
}
|
113 |
}
|
| 113 |
|
114 |
|
| 114 |
//+----------------------------------------------------------------------------------------------------------------+
|
115 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 115 |
// GESTION de la relation STRUCTURE A PERSONNE
|
116 |
// GESTION de la relation STRUCTURE A PERSONNE
|
| Line 116... |
Line 117... |
| 116 |
|
117 |
|
| 117 |
public void selectionnerStructureAPersonne(Rafraichissable vue, String idUtilisateur, String projetId, String structureId, String roleId) {
|
118 |
public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String idUtilisateur, String projetId, String structureId, String roleId) {
|
| 118 |
// Gestion des données de la table coel_structure_a_personne
|
119 |
// Gestion des données de la table coel_structure_a_personne
|
| 119 |
if (structureId != null && roleId != null) {
|
120 |
if (structureId != null && roleId != null) {
|
| Line 120... |
Line 121... |
| 120 |
StructureAPersonneAsyncDao sapDao = new StructureAPersonneAsyncDao();
|
121 |
StructureAPersonneAsyncDao sapDao = new StructureAPersonneAsyncDao();
|
| 121 |
sapDao.selectionner(vue, idUtilisateur, structureId, roleId);
|
122 |
sapDao.selectionner(vueARafraichir, idUtilisateur, structureId, roleId);
|
| 122 |
}
|
123 |
}
|
| 123 |
}
|
124 |
}
|
| Line 124... |
Line 125... |
| 124 |
|
125 |
|
| 125 |
public void modifierStructureAPersonne(Rafraichissable vue, String utilisateurId, StructureAPersonne personnel) {
|
126 |
public void modifierStructureAPersonne(Rafraichissable vueARafraichir, String utilisateurId, StructureAPersonne personnel) {
|
| 126 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
127 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
| 127 |
structureAPersonneDao.modifier(vue, utilisateurId, personnel);
|
128 |
structureAPersonneDao.modifier(vueARafraichir, utilisateurId, personnel);
|
| Line 128... |
Line 129... |
| 128 |
}
|
129 |
}
|
| 129 |
|
130 |
|
| 130 |
public void ajouterStructureAPersonne(Rafraichissable vue, String utilisateurId, String structureId, StructureAPersonne personnel) {
|
131 |
public void ajouterStructureAPersonne(Rafraichissable vueARafraichir, String utilisateurId, String structureId, StructureAPersonne personnel) {
|
| Line 131... |
Line 132... |
| 131 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
132 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
| 132 |
structureAPersonneDao.ajouter(vue, utilisateurId, structureId, personnel);
|
- |
|
| - |
|
133 |
structureAPersonneDao.ajouter(vueARafraichir, utilisateurId, structureId, personnel);
|
| - |
|
134 |
}
|
| 133 |
}
|
135 |
|
| Line 134... |
Line 136... |
| 134 |
|
136 |
public void supprimerStructureAPersonne(Rafraichissable vueARafraichir, String utilisateurId, String personnelId) {
|
| 135 |
public void supprimerStructureAPersonne(Rafraichissable vue, String utilisateurId, String personnelId) {
|
137 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
| 136 |
StructureAPersonneAsyncDao structureAPersonneDao = new StructureAPersonneAsyncDao();
|
138 |
structureAPersonneDao.supprimer(vueARafraichir, utilisateurId, personnelId);
|
| Line 165... |
Line 167... |
| 165 |
|
167 |
|
| 166 |
//+----------------------------------------------------------------------------------------------------------------+
|
168 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 167 |
// GESTION DES PERSONNES
|
169 |
// GESTION DES PERSONNES
|
| Line 168... |
Line 170... |
| 168 |
//+----------------------------------------------------------------------------------------------------------------+
|
170 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 169 |
|
171 |
|
| 170 |
public void selectionnerPersonne(Rafraichissable vue, String personneId, String projetId, String nomComplet) {
|
172 |
public void selectionnerPersonne(Rafraichissable vueARafraichir, String personneId, String projetId, String nomComplet) {
|
| 171 |
PersonneAsyncDao pDao = new PersonneAsyncDao(vue);
|
173 |
PersonneAsyncDao pDao = new PersonneAsyncDao(vueARafraichir);
|
| Line 172... |
Line 174... |
| 172 |
pDao.selectionner(personneId, projetId, nomComplet);
|
174 |
pDao.selectionner(personneId, projetId, nomComplet);
|
| 173 |
}
|
175 |
}
|
| 174 |
|
176 |
|
| Line 175... |
Line 177... |
| 175 |
public void supprimerPersonne(Rafraichissable vue, String idStr) {
|
177 |
public void supprimerPersonne(Rafraichissable vueARafraichir, String idStr) {
|
| Line 176... |
Line 178... |
| 176 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vue);
|
178 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vueARafraichir);
|
| 177 |
personneDao.supprimer(vue, idStr);
|
179 |
personneDao.supprimer(vueARafraichir, idStr);
|
| 178 |
|
180 |
|
| 179 |
}
|
181 |
}
|
| Line 180... |
Line 182... |
| 180 |
|
182 |
|
| 181 |
public void ajouterPersonne(Rafraichissable vue, Personne personne) {
|
183 |
public void ajouterPersonne(Rafraichissable vue, Personne personne) {
|
| 182 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vue);
|
184 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vue);
|
| 183 |
personneDao.ajouter(vue, personne);
|
185 |
personneDao.ajouter(vue, personne);
|
| Line 184... |
Line 186... |
| 184 |
}
|
186 |
}
|
| 185 |
|
187 |
|
| 186 |
public void modifierPersonne(Rafraichissable vue, Personne personne) {
|
188 |
public void modifierPersonne(Rafraichissable vueARafraichir, Personne personne) {
|
| Line 187... |
Line 189... |
| 187 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vue);
|
189 |
PersonneAsyncDao personneDao = new PersonneAsyncDao(vueARafraichir);
|
| 188 |
personneDao.modifier(vue, personne);
|
190 |
personneDao.modifier(vueARafraichir, personne);
|
| 189 |
}
|
191 |
}
|
| 190 |
|
192 |
|
| Line 191... |
Line 193... |
| 191 |
//+----------------------------------------------------------------------------------------------------------------+
|
193 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 192 |
// GESTION DES PUBLICATIONS
|
194 |
// GESTION DES PUBLICATIONS
|
| 193 |
//+----------------------------------------------------------------------------------------------------------------+
|
195 |
//+----------------------------------------------------------------------------------------------------------------+
|
| 194 |
|
196 |
|
| Line 195... |
Line 197... |
| 195 |
public void selectionnerPublications(Rafraichissable vue) {
|
197 |
public void selectionnerPublications(Rafraichissable vueARafraichir) {
|
| 196 |
PublicationAsyncDao lsDao = new PublicationAsyncDao(vue);
|
198 |
PublicationAsyncDao lsDao = new PublicationAsyncDao(vueARafraichir);
|
| 197 |
lsDao.obtenirListePublication();
|
199 |
lsDao.obtenirListePublication();
|
| 198 |
}
|
200 |
}
|
| Line 199... |
Line 201... |
| 199 |
|
201 |
|
| 200 |
public void modifierPublication(Rafraichissable vue, String utilisateurId, Publication publi) {
|
202 |
public void modifierPublication(Rafraichissable vueRafraichir, String utilisateurId, Publication publi) {
|
| 201 |
PublicationAsyncDao pDao = new PublicationAsyncDao(vue);
|
203 |
PublicationAsyncDao pDao = new PublicationAsyncDao(vueRafraichir);
|
| 202 |
pDao.modifierPublication(utilisateurId, publi);
|
204 |
pDao.modifierPublication(utilisateurId, publi);
|
| 203 |
}
|
205 |
}
|
| 204 |
|
206 |
|
| 205 |
public void ajouterPublication(Rafraichissable vue, String utilisateurId, Publication publi) {
|
207 |
public void ajouterPublication(Rafraichissable vueARafraichir, String utilisateurId, Publication publi) {
|
| 206 |
PublicationAsyncDao pDao = new PublicationAsyncDao(vue);
|
208 |
PublicationAsyncDao pDao = new PublicationAsyncDao(vueARafraichir);
|
| 207 |
pDao.ajouterPublication(utilisateurId, publi);
|
209 |
pDao.ajouterPublication(utilisateurId, publi);
|
| 208 |
}
|
210 |
}
|
| 209 |
|
211 |
|
| 210 |
public void supprimerPublication(Rafraichissable vue, String utilisateurId, List<Publication> publicationListe) {
|
212 |
public void supprimerPublication(Rafraichissable vueARafraichir, String utilisateurId, List<Publication> publicationListe) {
|
| Line 211... |
Line 213... |
| 211 |
String idPubs = "";
|
213 |
String idPubs = "";
|
| 212 |
for(Iterator<Publication> it = publicationListe.iterator(); it.hasNext();) {
|
214 |
for(Iterator<Publication> it = publicationListe.iterator(); it.hasNext();) {
|