1 17 package tutorial; 18 19 import org.apache.avalon.framework.logger.AbstractLogEnabled; 20 import org.apache.avalon.framework.context.Contextualizable; 21 import org.apache.avalon.framework.context.Context; 22 import org.apache.avalon.framework.context.ContextException; 23 24 30 public class IdentifiableComponent extends AbstractLogEnabled 31 implements Identifiable, Contextualizable 32 { 33 34 private String m_identity = null; 35 36 44 public void contextualize( Context context ) 45 throws ContextException 46 { 47 getLogger().info( "contextualize" ); 48 String name = (String ) context.get( "urn:avalon:name" ); 49 String partition = (String ) context.get( "urn:avalon:partition" ); 50 m_identity = partition + name; 51 } 52 53 public String getIdentity() 54 { 55 return m_identity; 56 } 57 58 } 59 | Popular Tags |