Index: topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityEvent.java diff -u /dev/null topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityEvent.java:1.1 --- /dev/null Thu Jan 5 04:51:28 2006 +++ topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityEvent.java Thu Jan 5 04:51:23 2006 @@ -0,0 +1,71 @@ +/* *##% + * Copyright (C) 2002, 2003 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. + *##%*/ + +/* * + * TopiaEntityEvent.java + * + * Created: 14 mai 2004 + * + * @author Benjamin Poussin + * Copyright Code Lutin + * @version $Revision: 1.1 $ + * + * Mise a jour: $Date: 2006/01/05 04:51:23 $ + * par : $Author: bpoussin $ + */ + +package org.codelutin.topia.event; + +import java.util.Date; +import java.util.EventObject; + +public class TopiaVetoableEntityEvent extends EventObject { // TopiaEntityEvent + + /** */ + private static final long serialVersionUID = 1L; + + protected long date = 0; + protected Object id = null; + + /** + * @param source l'objet d'ou provient l'event + * @param entity l'entity sur lequel porte l'event + */ + public TopiaVetoableEntityEvent(Object source, Object id){ + super(source); + this.id = id; + date = System.currentTimeMillis(); + } + + /** + * Retourne la liste des entitées sur lequel porte l'event + * @return une liste non modifiable d'entité + */ + public Object getId(){ + return id; + } + + /** + * Le moment ou l'event a ete créé. + */ + public Date getCreationDate(){ + return new Date(date); + } + +} // TopiaEntityEvent + Index: topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityListener.java diff -u /dev/null topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityListener.java:1.1 --- /dev/null Thu Jan 5 04:51:28 2006 +++ topia2/src/java/org/codelutin/topia/event/TopiaVetoableEntityListener.java Thu Jan 5 04:51:23 2006 @@ -0,0 +1,58 @@ +/* *##% + * Copyright (C) 2002, 2003 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. + *##%*/ + +/* * + * TopiaEntityListener.java + * + * Created: 14 mai 2004 + * + * @author Benjamin Poussin + * Copyright Code Lutin + * @version $Revision: 1.1 $ + * + * Mise a jour: $Date: 2006/01/05 04:51:23 $ + * par : $Author: bpoussin $ + */ + +package org.codelutin.topia.event; + +import java.util.EventListener; + +public interface TopiaVetoableEntityListener extends EventListener { + + /** + * Appelé lorsqu'une ou plusieurs entités ont été chargées + */ + public void loadEntity(TopiaVetoableEntityEvent event); + + /** + * Appelé lorsqu'une ou plusieurs entités ont été créées + */ + public void createEntity(TopiaVetoableEntityEvent event); + + /** + * Appelé lorsqu'une ou plusieurs entités ont été modifiées + */ + public void updateEntity(TopiaVetoableEntityEvent event); + + /** + * Appelé lorsqu'une ou plusieurs entités ont été supprimées + */ + public void deleteEntity(TopiaVetoableEntityEvent event); + +}