1 22 package org.jboss.kernel.plugins.deployment.xml; 23 24 import java.util.ArrayList ; 25 import java.util.List ; 26 27 import javax.xml.namespace.QName ; 28 29 import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; 30 import org.jboss.beans.metadata.plugins.AbstractInstallMetaData; 31 import org.jboss.beans.metadata.spi.InstallMetaData; 32 import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor; 33 34 40 public class BeanUninstallInterceptor extends DefaultElementInterceptor 41 { 42 43 public static final BeanUninstallInterceptor INTERCEPTOR = new BeanUninstallInterceptor(); 44 45 public void add(Object parent, Object child, QName name) 46 { 47 AbstractBeanMetaData bean = (AbstractBeanMetaData) parent; 48 AbstractInstallMetaData uninstall = (AbstractInstallMetaData) child; 49 List <InstallMetaData> uninstalls = bean.getUninstalls(); 50 if (uninstalls == null) 51 { 52 uninstalls = new ArrayList <InstallMetaData>(); 53 bean.setUninstalls(uninstalls); 54 } 55 uninstalls.add(uninstall); 56 } 57 } 58 | Popular Tags |