Index: topia2/src/java/org/codelutin/topia/TopiaContext.java diff -u topia2/src/java/org/codelutin/topia/TopiaContext.java:1.7 topia2/src/java/org/codelutin/topia/TopiaContext.java:1.8 --- topia2/src/java/org/codelutin/topia/TopiaContext.java:1.7 Mon Jan 23 13:51:52 2006 +++ topia2/src/java/org/codelutin/topia/TopiaContext.java Mon Jan 30 14:38:53 2006 @@ -23,10 +23,10 @@ * Created: 3 janv. 2006 21:18:34 * * @author poussin - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * - * Last update: $Date: 2006/01/23 13:51:52 $ - * by : $Author: bpoussin $ + * Last update: $Date: 2006/01/30 14:38:53 $ + * by : $Author: thimel $ */ package org.codelutin.topia; @@ -36,8 +36,10 @@ import java.util.List; import org.codelutin.topia.event.TopiaEntityListener; +import org.codelutin.topia.event.TopiaEntityLoadListener; import org.codelutin.topia.event.TopiaTransactionListener; import org.codelutin.topia.event.TopiaVetoableEntityListener; +import org.codelutin.topia.event.TopiaVetoableEntityLoadListener; import org.codelutin.topia.persistence.TopiaEntity; /** @@ -60,19 +62,32 @@ public void removeTransactionListener(TopiaTransactionListener l); /** - * Permet d'ajouter un listener qui pourra interdire certaine action: - * chargement, creation, modification, suppression - * @param l le listener a ajouter + * Permet d'ajouter un vetoableListener qui pourra interdire certaines + * actions : creation, modification, suppression + * @param l le vetoableListener a ajouter */ public void addVetoableListener(TopiaVetoableEntityListener l); /** - * Enleve un listener qui peut empecher des actions - * @param l le listener a enlever + * Enleve un vetoableListener qui peut empecher des actions + * @param l le vetoableListener a enlever */ public void removeVetoableListener(TopiaVetoableEntityListener l); + + /** + * Permet d'ajouter un vetoableLoadListener qui pourra interdire les actions + * de chargement + * @param l le vetoableLoadListener a ajouter + */ + public void addVetoableLoadListener(TopiaVetoableEntityLoadListener l); /** + * Enleve un vetoableLoadListener qui peut empecher des actions + * @param l le vetoableLoadListener a enlever + */ + public void removeVetoableLoadListener(TopiaVetoableEntityLoadListener l); + + /** * Adds a new TopiaEntityListener to the subscribers list. * @param topiaEntityListener - the TopiaEntityListener to add to the subscribers list. */ @@ -100,6 +115,34 @@ */ public void removeTopiaEntityListener(Class entityClass, TopiaEntityListener l); + /** + * Adds a new TopiaEntityLoadListener to the subscribers list. + * @param topiaEntityLoadListener - the TopiaEntityLoadListener to add to the subscribers list. + */ + public void addTopiaEntityLoadListener(TopiaEntityLoadListener l); + + /** + * Adds a new TopiaEntityLoadListener to the subscribers list. + * @param entityClass la classe de l'entity pour lequel on veut etre notifié + * les events des classes enfants nous parviennent aussi + * @param topiaEntityLoadListener - the TopiaEntityLoadListener to add to the subscribers list. + */ + public void addTopiaEntityLoadListener(Class entityClass, TopiaEntityLoadListener l); + + /** + * Removes a TopiaEntityLoadListener from the subscribers list. + * @param topiaEntityLoadListener - the TopiaEntityLoadListener to remove from the subscribers. + */ + public void removeTopiaEntityLoadListener(TopiaEntityLoadListener l); + + /** + * Removes a TopiaEntityLoadListener from the subscribers list. + * @param entityClass la classe de l'entity pour lequel on ne veut plus + * etre notifié. Si on n'etait pas listener de cette classe rien ne se passe + * @param topiaEntityLoadListener - the TopiaEntityLoadListener to remove from the subscribers. + */ + public void removeTopiaEntityLoadListener(Class entityClass, TopiaEntityLoadListener l); + public TopiaContext beginTransaction() throws TopiaNotFoundException; /**