1 23 24 package javax.enterprise.deploy.model; 25 26 import java.beans.PropertyChangeEvent ; 27 28 32 public final class XpathEvent { 33 34 private final DDBean bean; 35 private final Object typ; 36 private PropertyChangeEvent changeEvent; 37 38 41 public static final Object BEAN_ADDED = new Object (); 42 45 public static final Object BEAN_REMOVED = new Object (); 46 49 public static final Object BEAN_CHANGED = new Object (); 50 51 56 public XpathEvent(DDBean bean, Object typ) { 57 this.bean = bean; this.typ = typ; 58 } 59 60 public PropertyChangeEvent getChangeEvent() { 61 if(typ == BEAN_CHANGED) return changeEvent; 62 return null; 63 } 64 65 public void setChangeEvent(PropertyChangeEvent pce) { 66 changeEvent = pce; 67 } 68 69 73 public DDBean getBean() {return bean;} 74 75 78 public boolean isAddEvent() {return typ == BEAN_ADDED;} 79 80 83 public boolean isRemoveEvent() {return typ == BEAN_REMOVED;} 84 85 88 public boolean isChangeEvent() {return typ == BEAN_CHANGED;} 89 90 } 91 | Popular Tags |