POssibiliter Grupe: Renomer, supprimer, créer, ajouter des Etudiant
This commit is contained in:
@@ -32,8 +32,8 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
* @param g le groupe (methode récursive)
|
||||
*/
|
||||
private void addSousGroupe(Groupe g){
|
||||
this.brain.put(g.getId(), g);
|
||||
for(Groupe s:g.getSousGroupes()){
|
||||
this.brain.put(g.getId(), g);
|
||||
this.addSousGroupe(s);
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
if (this.getPromotion().equals(g)){
|
||||
throw new IllegalArgumentException("Impossible de détruire le groupe de toute la promotion");
|
||||
}
|
||||
if (g.getSize()>0){
|
||||
if (g.getSousGroupes().size()>0){
|
||||
throw new IllegalStateException("Impossible de détruire un groupe contenant un groupe");
|
||||
}
|
||||
g.getPointPoint().removeSousGroupe(g);
|
||||
|
Reference in New Issue
Block a user