diff --git a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java index 881cd2f7a..67ba49f3f 100644 --- a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java +++ b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java @@ -41,7 +41,7 @@ public class Facility { final String name = attributes[ i ]; final String value = configuration.getAttribute( name ); - configure( this, name, value ); + configureAttribute( this, name, value ); } final Configuration[] children = configuration.getChildren(); @@ -60,7 +60,7 @@ public class Facility throw new ConfigurationException( message, e ); } - configure( m_aspectHandler, children[ 0 ] ); + configureElement( m_aspectHandler, children[ 0 ] ); } else { diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java index 48088bb6a..1116f23b5 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java @@ -64,7 +64,7 @@ public class ClassicConfigurer * @param context the Context * @exception ConfigurationException if an error occurs */ - public void configure( final Object object, + public void configureElement( final Object object, final Configuration configuration, final TaskContext context ) throws ConfigurationException @@ -154,7 +154,7 @@ public class ClassicConfigurer * @param context the Context * @exception ConfigurationException if an error occurs */ - public void configure( final Object object, + public void configureAttribute( final Object object, final String name, final String value, final TaskContext context ) @@ -474,7 +474,7 @@ public class ClassicConfigurer try { final Object created = method.invoke( object, new Object[ 0 ] ); - configure( created, configuration, context ); + configureElement( created, configuration, context ); } catch( final ConfigurationException ce ) { @@ -498,7 +498,7 @@ public class ClassicConfigurer final Class clazz = method.getParameterTypes()[ 0 ]; final Object created = clazz.newInstance(); - configure( created, configuration, context ); + configureElement( created, configuration, context ); method.invoke( object, new Object[]{created} ); } catch( final ConfigurationException ce ) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java index 1ee98a110..205ccffe9 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java @@ -77,7 +77,7 @@ public class DefaultConfigurer * @param context the Context * @exception ConfigurationException if an error occurs */ - public void configure( final Object object, + public void configureElement( final Object object, final Configuration configuration, final TaskContext context ) throws ConfigurationException @@ -217,7 +217,7 @@ public class DefaultConfigurer * @param context the Context * @exception ConfigurationException if an error occurs */ - public void configure( final Object object, + public void configureAttribute( final Object object, final String name, final String value, final TaskContext context ) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java index b7d61bdfd..665f46961 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java @@ -115,7 +115,7 @@ public class DefaultExecutor final TaskContext taskContext ) throws ConfigurationException { - m_configurer.configure( task, taskModel, taskContext ); + m_configurer.configureElement( task, taskModel, taskContext ); } /** diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java index 0ecad83de..52e056f12 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java @@ -89,10 +89,10 @@ public abstract class AbstractContainerTask * @param element the configuration element * @exception ConfigurationException if an error occurs */ - protected final void configure( final Object object, final Configuration element ) + protected final void configureElement( final Object object, final Configuration element ) throws ConfigurationException { - m_configurer.configure( object, element, getContext() ); + m_configurer.configureElement( object, element, getContext() ); } /** @@ -103,10 +103,10 @@ public abstract class AbstractContainerTask * @param value the attibute value * @exception ConfigurationException if an error occurs */ - protected final void configure( final Object object, final String name, final String value ) + protected final void configureAttribute( final Object object, final String name, final String value ) throws ConfigurationException { - m_configurer.configure( object, name, value, getContext() ); + m_configurer.configureAttribute( object, name, value, getContext() ); } /** diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java index eefe3b4fa..db106800f 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java @@ -45,7 +45,7 @@ public class TypeInstanceTask if( name.equals( "id" ) || name.equals( "local-scope" ) ) { - configure( this, name, value ); + configureAttribute( this, name, value ); } else { @@ -69,7 +69,7 @@ public class TypeInstanceTask throw new ConfigurationException( message, e ); } - configure( m_value, newConfiguration ); + configureElement( m_value, newConfiguration ); } public void setId( final String id ) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java index e9977034e..56970eccc 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java @@ -32,7 +32,7 @@ public interface Configurer * @param context the Context * @exception ConfigurationException if an error occurs */ - void configure( Object object, Configuration configuration, TaskContext context ) + void configureElement( Object object, Configuration configuration, TaskContext context ) throws ConfigurationException; /** @@ -46,6 +46,6 @@ public interface Configurer * @param context the Context * @exception ConfigurationException if an error occurs */ - void configure( Object object, String name, String value, TaskContext context ) + void configureAttribute( Object object, String name, String value, TaskContext context ) throws ConfigurationException; } diff --git a/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java b/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java index 18dc930f5..ef23c75a0 100644 --- a/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java +++ b/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java @@ -146,7 +146,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -205,7 +205,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -252,7 +252,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -323,7 +323,7 @@ public class DefaultConfigurerTest m_context.setProperty( "prop-a", "some value" ); // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); // Check the configured object final ConfigTestReferenceElement expected = new ConfigTestReferenceElement(); @@ -349,7 +349,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -429,7 +429,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -458,7 +458,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -616,7 +616,7 @@ public class DefaultConfigurerTest final ConfigTestConfigurable test = new ConfigTestConfigurable(); // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); final ConfigTestConfigurable expected = new ConfigTestConfigurable(); expected.configure( config ); @@ -662,7 +662,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -693,7 +693,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -753,7 +753,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -797,7 +797,7 @@ public class DefaultConfigurerTest { try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); } catch( final ConfigurationException ce ) { diff --git a/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java b/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java index 18dc930f5..ef23c75a0 100644 --- a/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java +++ b/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java @@ -146,7 +146,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -205,7 +205,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -252,7 +252,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -323,7 +323,7 @@ public class DefaultConfigurerTest m_context.setProperty( "prop-a", "some value" ); // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); // Check the configured object final ConfigTestReferenceElement expected = new ConfigTestReferenceElement(); @@ -349,7 +349,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -429,7 +429,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -458,7 +458,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( final ConfigurationException ce ) @@ -616,7 +616,7 @@ public class DefaultConfigurerTest final ConfigTestConfigurable test = new ConfigTestConfigurable(); // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); final ConfigTestConfigurable expected = new ConfigTestConfigurable(); expected.configure( config ); @@ -662,7 +662,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -693,7 +693,7 @@ public class DefaultConfigurerTest // Configure the object try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -753,7 +753,7 @@ public class DefaultConfigurerTest try { // Configure the object - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); fail(); } catch( ConfigurationException e ) @@ -797,7 +797,7 @@ public class DefaultConfigurerTest { try { - m_configurer.configure( test, config, m_context ); + m_configurer.configureElement( test, config, m_context ); } catch( final ConfigurationException ce ) {