mcconnell 2002/07/18 10:34:33 Modified: assembly/demo/src/java/org/apache/excalibur/playground BasicComponent.java BasicComponent.xinfo BasicComponent.xprofile assembly/src/java/org/apache/excalibur/merlin/model Entry.java Parameter.java assembly/src/java/org/apache/excalibur/merlin/model/builder XMLProfileCreator.java Log: updated to include debugging of nested context parameter Revision Changes Path 1.5 +12 -0 jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.java Index: BasicComponent.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BasicComponent.java 18 Jul 2002 16:57:00 -0000 1.4 +++ BasicComponent.java 18 Jul 2002 17:34:32 -0000 1.5 @@ -2,6 +2,8 @@ package org.apache.excalibur.playground; +import java.io.File; + import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.Contextualizable; @@ -20,6 +22,7 @@ { private String m_location; + private File m_home; public void contextualize( Context context ) { @@ -31,6 +34,15 @@ catch( Throwable e ) { getLogger().error("contextualization failure", e ); + } + try + { + getLogger().info("home class: " + context.get("home").getClass().getName() ); + m_home = (File) context.get("home"); + } + catch( Throwable e ) + { + getLogger().error("contextualization failure for home key", e ); } } 1.6 +1 -0 jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.xinfo Index: BasicComponent.xinfo =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.xinfo,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BasicComponent.xinfo 18 Jul 2002 16:57:00 -0000 1.5 +++ BasicComponent.xinfo 18 Jul 2002 17:34:32 -0000 1.6 @@ -11,6 +11,7 @@ <context> <entry key="location"/> + <entry key="home" type="java.io.File"/> </context> <services> 1.3 +1 -0 jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.xprofile Index: BasicComponent.xprofile =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/demo/src/java/org/apache/excalibur/playground/BasicComponent.xprofile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BasicComponent.xprofile 18 Jul 2002 16:57:00 -0000 1.2 +++ BasicComponent.xprofile 18 Jul 2002 17:34:32 -0000 1.3 @@ -12,6 +12,7 @@ <component name="basic"> <context class="org.apache.excalibur.playground.BasicContext"> <entry key="location">Paris</entry> + <entry key="home" class="java.io.File">../assembly</entry> </context> </component> 1.2 +1 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Entry.java Index: Entry.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Entry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Entry.java 18 Jul 2002 16:57:00 -0000 1.1 +++ Entry.java 18 Jul 2002 17:34:33 -0000 1.2 @@ -45,7 +45,6 @@ public Entry( final String key, final String classname, final String value ) { super( classname, value ); - if( null == key ) throw new NullPointerException("key"); @@ -61,7 +60,6 @@ public Entry( final String key, final String classname, final Parameter[] parameters ) { super( classname, parameters ); - if( null == key ) throw new NullPointerException("key"); 1.2 +1 -5 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Parameter.java Index: Parameter.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Parameter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Parameter.java 18 Jul 2002 16:57:00 -0000 1.1 +++ Parameter.java 18 Jul 2002 17:34:33 -0000 1.2 @@ -40,10 +40,6 @@ */ public class Parameter { - // <parameter>Paris</parameter> - // <parameter class="java.io.File"> - // <parameter>./home</parameter> - // </parameter> /** * The classname to use as the parameter implementation class (defaults to java.lang.String) 1.6 +2 -2 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java Index: XMLProfileCreator.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XMLProfileCreator.java 18 Jul 2002 16:57:00 -0000 1.5 +++ XMLProfileCreator.java 18 Jul 2002 17:34:33 -0000 1.6 @@ -134,7 +134,7 @@ public Entry createEntry( Configuration config ) throws ConfigurationException { String key = config.getAttribute( "key" ); - String classname = config.getAttribute( "classname", "java.lang.String" ); + String classname = config.getAttribute( "class", "java.lang.String" ); String value = config.getValue( null ); if( value != null ) {
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>