1 8 package org.apache.avalon.phoenix; 9 10 import org.apache.avalon.framework.component.ComponentException; 11 import org.apache.avalon.framework.component.ComponentManager; 12 import org.apache.avalon.framework.component.Composable; 13 import org.apache.avalon.framework.configuration.Configurable; 14 import org.apache.avalon.framework.configuration.Configuration; 15 import org.apache.avalon.framework.configuration.ConfigurationException; 16 import org.apache.avalon.framework.context.Context; 17 import org.apache.avalon.framework.context.Contextualizable; 18 import org.apache.avalon.framework.logger.AbstractLogEnabled; 19 20 30 public abstract class AbstractBlock 31 extends AbstractLogEnabled 32 implements Block, Contextualizable, Composable, Configurable 33 { 34 private BlockContext m_context; 35 36 private Configuration m_configuration; 37 38 private ComponentManager m_componentManager; 39 40 public void contextualize( final Context context ) 41 { 42 m_context = (BlockContext)context; 43 } 44 45 public void configure( final Configuration configuration ) 46 throws ConfigurationException 47 { 48 m_configuration = configuration; 49 } 50 51 public void compose( final ComponentManager componentManager ) 52 throws ComponentException 53 { 54 m_componentManager = componentManager; 55 } 56 57 protected final BlockContext getBlockContext() 58 { 59 return m_context; 60 } 61 62 protected final ComponentManager getComponentManager() 63 { 64 return m_componentManager; 65 } 66 67 73 protected final Configuration getConfiguration() 74 { 75 return m_configuration; 76 } 77 } 78 | Popular Tags |