Author: tchemit Date: 2008-04-06 09:47:33 +0000 (Sun, 06 Apr 2008) New Revision: 387 Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java Removed: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEvent.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEventListener.java Log: improve VCSConnexionConfig (add srttter to contract) introduc event package to put all event stuff Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEvent.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEvent.java 2008-04-06 09:41:19 UTC (rev 386) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEvent.java 2008-04-06 09:47:33 UTC (rev 387) @@ -1,56 +0,0 @@ -/** - * # #% Copyright (C) 2008 Code Lutin, Tony Chemit - * 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.vcs; - -import java.util.EventObject; - -/** - * Events to be used while {@link org.codelutin.vcs.VCSHandler} life cycle. - * - * @author chemit - * @see org.codelutin.vcs.VCSHandlerEventListener - * @see org.codelutin.vcs.VCSHandler - */ -public class VCSConnexionEvent extends EventObject { - - private static final long serialVersionUID = 1L; - - protected Type state; - - public enum Type { - OPEN, CLOSE - } - - /** - * Constructs a prototypical Event. - * - * @param source The object on which the Event initially occurred. - * @param type type of event - * @throws IllegalArgumentException if source is null. - */ - public VCSConnexionEvent(VCSConnexion source, Type type) { - super(source); - this.state = type; - } - - @Override - public VCSConnexion getSource() { - return (VCSConnexion) super.getSource(); - } - - public Type getState() { - return state; - } -} \ No newline at end of file Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEventListener.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEventListener.java 2008-04-06 09:41:19 UTC (rev 386) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEventListener.java 2008-04-06 09:47:33 UTC (rev 387) @@ -1,38 +0,0 @@ -/** - * # #% Copyright (C) 2008 Code Lutin, Tony Chemit - * 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.vcs; - -/** - * A listener on {@link VCSConnexion} life cycle - * - * @author chemit - */ -public interface VCSConnexionEventListener extends java.util.EventListener { - - /** - * call when vcs connexion was successfull open - * - * @param event current event - */ - public void open(VCSConnexionEvent event); - - /** - * call when vcs connexion was closed - * - * @param event current event - */ - public void close(VCSConnexionEvent event); - -} \ No newline at end of file Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEvent.java) =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java 2008-04-06 09:47:33 UTC (rev 387) @@ -0,0 +1,58 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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.vcs.event; + +import org.codelutin.vcs.VCSConnexion; + +import java.util.EventObject; + +/** + * Events to be used while {@link org.codelutin.vcs.VCSHandler} life cycle. + * + * @author chemit + * @see org.codelutin.vcs.VCSHandlerEventListener + * @see org.codelutin.vcs.VCSHandler + */ +public class VCSConnexionEvent extends EventObject { + + private static final long serialVersionUID = 1L; + + protected Type state; + + public enum Type { + OPEN, CLOSE + } + + /** + * Constructs a prototypical Event. + * + * @param source The object on which the Event initially occurred. + * @param type type of event + * @throws IllegalArgumentException if source is null. + */ + public VCSConnexionEvent(VCSConnexion source, Type type) { + super(source); + this.state = type; + } + + @Override + public VCSConnexion getSource() { + return (VCSConnexion) super.getSource(); + } + + public Type getState() { + return state; + } +} \ No newline at end of file Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionEventListener.java) =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java 2008-04-06 09:47:33 UTC (rev 387) @@ -0,0 +1,38 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * 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.vcs.event; + +/** + * A listener on {@link org.codelutin.vcs.VCSConnexion} life cycle + * + * @author chemit + */ +public interface VCSConnexionEventListener extends java.util.EventListener { + + /** + * call when vcs connexion was successfull open + * + * @param event current event + */ + public void open(VCSConnexionEvent event); + + /** + * call when vcs connexion was closed + * + * @param event current event + */ + public void close(VCSConnexionEvent event); + +} \ No newline at end of file