Author: mcconnell Date: Wed Jun 9 05:47:35 2004 New Revision: 20940 Added: avalon/trunk/runtime/meta/test/testa/ avalon/trunk/runtime/meta/test/testa/build.properties (contents, props changed) avalon/trunk/runtime/meta/test/testa/build.xml (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/ avalon/trunk/runtime/meta/test/testa/src/main/ avalon/trunk/runtime/meta/test/testa/src/main/org/ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/A.java (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/ConfigurableComponent.java (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/DefaultFacade.java (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/Facade.java (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.java (contents, props changed) avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.xprofile (contents, props changed) Log: Add the "testa" suite.
Added: avalon/trunk/runtime/meta/test/testa/build.properties ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/build.properties Wed Jun 9 05:47:35 2004 @@ -0,0 +1,2 @@ +project.name = avalon-test-testa +project.home = ../../../../central/system Added: avalon/trunk/runtime/meta/test/testa/build.xml ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/build.xml Wed Jun 9 05:47:35 2004 @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<project name="avalon-test-testa" default="dist" basedir="." + xmlns:x="antlib:org.apache.avalon.tools" + xmlns:m="plugin:avalon/meta/avalon-meta-tools"> + + <property file="build.properties"/> + <import file="${project.home}/build/standard.xml"/> + + <target name="build" depends="standard.build"> + <m:meta destDir="${basedir}/target/classes"> + <fileset dir="${basedir}/src/main"> + <include name="**/*.java"/> + </fileset> + </m:meta> + </target> + +</project> Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/A.java ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/A.java Wed Jun 9 05:47:35 2004 @@ -0,0 +1,22 @@ +/* + * Copyright 2004 Apache Software Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.avalon.test.testa; + +public interface A +{ +} Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/ConfigurableComponent.java ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/ConfigurableComponent.java Wed Jun 9 05:47:35 2004 @@ -0,0 +1,38 @@ +/* + * Copyright 2004 Apache Software Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.avalon.test.testa; + +import org.apache.avalon.framework.configuration.Configurable; +import org.apache.avalon.framework.configuration.Configuration; +import org.apache.avalon.framework.configuration.ConfigurationException; +import org.apache.avalon.framework.logger.AbstractLogEnabled; + +import org.apache.avalon.util.configuration.ConfigurationUtil; + +/** + * @avalon.component name="conf-test" lifestyle="singleton" + */ +public class ConfigurableComponent extends AbstractLogEnabled + implements Configurable +{ + public void configure( Configuration config ) throws ConfigurationException + { + getLogger().info( "setting config to:" + + ConfigurationUtil.list( config ) ); + } +} Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/DefaultFacade.java ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/DefaultFacade.java Wed Jun 9 05:47:35 2004 @@ -0,0 +1,56 @@ +/* + * Copyright 2004 Apache Software Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.avalon.test.testa; + +import org.apache.avalon.framework.context.Context; +import org.apache.avalon.framework.context.ContextException; + +public class DefaultFacade implements Facade +{ + private Context m_context; + + public DefaultFacade( Context context ) + { + m_context = context; + } + + //------------------------------------------------------------ + // Context + //------------------------------------------------------------ + + public Object get( final Object key ) throws ContextException + { + return m_context.get( key ); + } + + //------------------------------------------------------------ + // Extra + //------------------------------------------------------------ + + public String getName() + { + try + { + return (String) m_context.get( "urn:avalon:name" ); + } + catch( ContextException e ) + { + throw new RuntimeException( e.toString() ); + } + } +} Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/Facade.java ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/Facade.java Wed Jun 9 05:47:35 2004 @@ -0,0 +1,25 @@ +/* + * Copyright 2004 Apache Software Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.avalon.test.testa; + +import org.apache.avalon.framework.context.Context; + +public interface Facade extends Context +{ + String getName(); +} Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.java ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.java Wed Jun 9 05:47:35 2004 @@ -0,0 +1,57 @@ +/* + * Copyright 2004 Apache Software Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.avalon.test.testa; + +import org.apache.avalon.framework.activity.Initializable; +import org.apache.avalon.framework.context.Context; +import org.apache.avalon.framework.context.ContextException; +import org.apache.avalon.framework.context.Contextualizable; +import org.apache.avalon.framework.logger.AbstractLogEnabled; + +/** + * @avalon.component name="component-a" lifestyle="singleton" + * @avalon.service type="org.apache.avalon.test.testa.A" + */ +public class TestA extends AbstractLogEnabled + implements Contextualizable, Initializable, A +{ + /** + * @avalon.content type="org.apache.avalon.test.testa.Facade" + * @avalon.entry key="urn:avalon:partition" + * @avalon.entry key="urn:avalon:classloader" type="java.lang.ClassLoader" + * @avalon.entry key="urn:avalon:home" type="java.io.File" + * @avalon.entry key="urn:avalon:temp" type="java.io.File" + * @avalon.entry key="urn:avalon:name" alias="name" + * @avalon.entry key="home" type="java.io.File" + * @avalon.entry key="time" type="java.util.Date" volatile="true" + * @avalon.entry key="path" + */ + public void contextualize( Context context ) throws ContextException + { + getLogger().info( "name: " + context.get( "urn:avalon:name" ) ); + getLogger().info( "partition: " + context.get( "urn:avalon:partition" ) ); + getLogger().info( "classloader: " + context.get( "urn:avalon:classloader" ) ); + getLogger().info( "work: " + context.get( "urn:avalon:home" ) ); + getLogger().info( "temp: " + context.get( "urn:avalon:temp" ) ); + } + + public void initialize() throws Exception + { + getLogger().info( "hello" ); + } +} Added: avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.xprofile ============================================================================== --- (empty file) +++ avalon/trunk/runtime/meta/test/testa/src/main/org/apache/avalon/test/testa/TestA.xprofile Wed Jun 9 05:47:35 2004 @@ -0,0 +1,6 @@ + +<profiles> + <profile name="aaa"/> + <profile name="bbb"/> + <profile name="ccc"/> +</profiles> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]