1 31 package org.objectweb.proactive.core.component.xml; 32 33 import org.objectweb.proactive.core.descriptor.data.ProActiveDescriptor; 34 35 import java.util.HashMap ; 36 37 38 46 public abstract class AbstractContainerComponentHandler extends ComponentHandler 47 implements ContainerHandlerMarker { 48 private boolean enabled; 49 private ContainerElementHierarchy containersHierarchy; 50 51 56 public AbstractContainerComponentHandler( 57 ProActiveDescriptor deploymentDescriptor, 58 ComponentsCache componentsCache, HashMap componentTypes, 59 ComponentsHandler fatherHandler) { 60 super(deploymentDescriptor, componentsCache, componentTypes); 61 enable(); 62 containersHierarchy = new ContainerElementHierarchy(); 63 containersHierarchy.addFatherHandler(fatherHandler); 64 containersHierarchy.disableGrandFatherHandler(); 65 ComponentsHandler handler = new ComponentsHandler(deploymentDescriptor, 67 componentsCache, componentTypes, this); 68 addHandler(ComponentsDescriptorConstants.COMPONENTS_TAG, handler); 69 getContainerElementHierarchy().addChildContainerHandler(handler); 70 } 71 72 public void enable() { 73 enabled = true; 74 } 75 76 public void disable() { 77 enabled = false; 78 } 79 80 public boolean isEnabled() { 81 return enabled; 82 } 83 84 87 public ContainerElementHierarchy getContainerElementHierarchy() { 88 return containersHierarchy; 89 } 90 } 91 | Popular Tags |