Index: topia2/src/java/org/codelutin/topia/event/TopiaTransactionEvent.java diff -u topia2/src/java/org/codelutin/topia/event/TopiaTransactionEvent.java:1.4 topia2/src/java/org/codelutin/topia/event/TopiaTransactionEvent.java:1.5 --- topia2/src/java/org/codelutin/topia/event/TopiaTransactionEvent.java:1.4 Wed Nov 22 20:20:56 2006 +++ topia2/src/java/org/codelutin/topia/event/TopiaTransactionEvent.java Fri Nov 16 11:26:16 2007 @@ -19,7 +19,6 @@ package org.codelutin.topia.event; import java.util.EventObject; -import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -27,7 +26,6 @@ import org.codelutin.topia.TopiaContext; import org.codelutin.topia.framework.EntityState; import org.codelutin.topia.persistence.TopiaEntity; -import org.hibernate.util.IdentitySet; public class TopiaTransactionEvent extends EventObject { Index: topia2/src/java/org/codelutin/topia/event/TopiaContextEvent.java diff -u /dev/null topia2/src/java/org/codelutin/topia/event/TopiaContextEvent.java:1.1 --- /dev/null Fri Nov 16 11:26:21 2007 +++ topia2/src/java/org/codelutin/topia/event/TopiaContextEvent.java Fri Nov 16 11:26:16 2007 @@ -0,0 +1,54 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.topia.event; + +import java.util.EventObject; + +import org.codelutin.topia.TopiaContext; + +/** + * TopiaContextEvent + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007-11-16 11:26:16 $ + * By : $Author: chatellier $ + */ +public class TopiaContextEvent extends EventObject { + + /** Version UID */ + private static final long serialVersionUID = 560256125962144181L; + + /** + * Constructor + * @param source + */ + public TopiaContextEvent(Object source) { + super(source); + } + + /** + * Get source + */ + public TopiaContext getSource() { + return (TopiaContext)source; + } + +} Index: topia2/src/java/org/codelutin/topia/event/TopiaContextListener.java diff -u /dev/null topia2/src/java/org/codelutin/topia/event/TopiaContextListener.java:1.1 --- /dev/null Fri Nov 16 11:26:21 2007 +++ topia2/src/java/org/codelutin/topia/event/TopiaContextListener.java Fri Nov 16 11:26:16 2007 @@ -0,0 +1,62 @@ +/* *##% + * Copyright (C) 2007 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package org.codelutin.topia.event; + +import java.util.EventListener; + +/** + * Listener for TopiaContext actions. + * + * Listener are notified for action such as : + * - createSchema + * - updateSchema + * - ... + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007-11-16 11:26:16 $ + * By : $Author: chatellier $ + */ +public interface TopiaContextListener extends EventListener { + + /** + * Called before createSchema call + * @param event evet + */ + public void preCreateSchema(TopiaContextEvent event); + + /** + * Called after createSchema call + * @param event event + */ + public void postCreateSchema(TopiaContextEvent event); + + /** + * Called before updateSchema call + * @param event event + */ + public void preUpdateSchema(TopiaContextEvent event); + + /** + * Called after updateSchema call + * @param event event + */ + public void postUpdateSchema(TopiaContextEvent event); +}