Clover coverage report - J2EE Deployment - 1.0.0
Coverage timestamp: sam. déc. 27 2003 15:14:34 CET
file stats: LOC: 113   Methods: 7
NCLOC: 40   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
XpathEvent.java - 0% 0% 0%
coverage
 1   
 /*
 2   
  * EJTools, the Enterprise Java Tools
 3   
  *
 4   
  * Distributable under LGPL license.
 5   
  * See terms of license at www.gnu.org.
 6   
  */
 7   
 package javax.enterprise.deploy.model;
 8   
 
 9   
 import java.beans.PropertyChangeEvent;
 10   
 
 11   
 /**
 12   
  * An Event class describing ConfigBeans being added/subtracted from a server configuration.
 13   
  *
 14   
  * @author    Laurent Etiemble
 15   
  * @version   $Revision: 1.1 $
 16   
  * @since     1.0
 17   
  */
 18   
 public class XpathEvent
 19   
 {
 20   
    /** The associated ConfigBean */
 21   
    private DDBean bean;
 22   
    /** The change event */
 23   
    private PropertyChangeEvent pce;
 24   
    /** The event type */
 25   
    private Object type;
 26   
 
 27   
    /** Adding a DDBean */
 28   
    public final static Object BEAN_ADDED = new Object();
 29   
    /** Removing a DDBean */
 30   
    public final static Object BEAN_CHANGED = new Object();
 31   
    /** Changing a DDBean */
 32   
    public final static Object BEAN_REMOVED = new Object();
 33   
 
 34   
 
 35   
    /**
 36   
     * A description of a change in the ConfigBean tree.
 37   
     *
 38   
     * @param bean  The ConfigBean being added/removed.
 39   
     * @param type  Indicates an add/change/remove event.
 40   
     */
 41  0
    public XpathEvent(DDBean bean, Object type)
 42   
    {
 43  0
       this.bean = bean;
 44  0
       this.type = type;
 45   
    }
 46   
 
 47   
 
 48   
    /**
 49   
     * Returns the bean being added/removed/changed.
 50   
     *
 51   
     * @return   The bean being added/removed/changed.
 52   
     */
 53  0
    public DDBean getBean()
 54   
    {
 55  0
       return this.bean;
 56   
    }
 57   
 
 58   
 
 59   
    /**
 60   
     * Returns the event
 61   
     *
 62   
     * @return   The event value
 63   
     */
 64  0
    public PropertyChangeEvent getChangeEvent()
 65   
    {
 66  0
       return this.pce;
 67   
    }
 68   
 
 69   
 
 70   
    /**
 71   
     * Is this an add event ?
 72   
     *
 73   
     * @return   True if it is an add event
 74   
     */
 75  0
    public boolean isAddEvent()
 76   
    {
 77  0
       return (BEAN_ADDED == this.type);
 78   
    }
 79   
 
 80   
 
 81   
    /**
 82   
     * Is this an change event ?
 83   
     *
 84   
     * @return   True if it is an change event
 85   
     */
 86  0
    public boolean isChangeEvent()
 87   
    {
 88  0
       return (BEAN_CHANGED == this.type);
 89   
    }
 90   
 
 91   
 
 92   
    /**
 93   
     * Is this an remove event ?
 94   
     *
 95   
     * @return   True if it is an remove event
 96   
     */
 97  0
    public boolean isRemoveEvent()
 98   
    {
 99  0
       return (BEAN_REMOVED == this.type);
 100   
    }
 101   
 
 102   
 
 103   
    /**
 104   
     * Sets the event
 105   
     *
 106   
     * @param pce  The event value
 107   
     */
 108  0
    public void setChangeEvent(PropertyChangeEvent pce)
 109   
    {
 110  0
       this.pce = pce;
 111   
    }
 112   
 }
 113