You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/07/26 09:52:53 UTC

cvs commit: avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags ExtensionTag.java StageTag.java

mcconnell    2003/07/26 00:52:53

  Modified:    meta/site/xdocs/meta/data index.xml
               meta/site/xdocs/tools/tags attribute.xml context.xml
                        dependency.xml entry.xml extension.xml index.xml
                        logger.xml navigation.xml service.xml stage.xml
                        type.xml
               meta/tools/src/java/org/apache/avalon/meta/info/builder/tags
                        ExtensionTag.java StageTag.java
  Log:
  Update the source to reflect a switch from type to urm on extensions and stage declarations.
  
  Revision  Changes    Path
  1.3       +1 -1      avalon-sandbox/meta/site/xdocs/meta/data/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/meta/data/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml	22 Jul 2003 06:03:49 -0000	1.2
  +++ index.xml	26 Jul 2003 07:52:53 -0000	1.3
  @@ -37,7 +37,7 @@
           automation of many component management aspects in a container 
           independent fashion.  For additional information please post 
           questions to the <a href="mailto:dev@avalon.apache.org">Avalon dev 
  -        mailing list</a>.
  +        mailing list</a>.</p>
         </subsection>
         
       </section>
  
  
  
  1.2       +22 -3     avalon-sandbox/meta/site/xdocs/tools/tags/attribute.xml
  
  Index: attribute.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/attribute.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- attribute.xml	14 Jul 2003 20:22:20 -0000	1.1
  +++ attribute.xml	26 Jul 2003 07:52:53 -0000	1.2
  @@ -13,9 +13,28 @@
   
         <subsection name="Attribute Tag">
   <p>An attribute may be declared within an interface or class. When declared under an interface the attribute will be included in the generated service defintion.  When declared under a class, the attribute will be included in the info element of the type defintion.</p>
  +      </subsection>
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td>key</td><td>yes</td>
  +            <td>
  +              <p>The attribute lookup key.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>value</td><td>no</td>
  +            <td>
  +              <p>The attribute value. If not declared, a null value is assumed.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +      <subsection name="Example">
   
   <source><![CDATA[
  -package net.osm;
  +package org.apache.avalon.playground;
   
   /**
    * Example of the declaration of a series of attributes.
  @@ -62,7 +81,7 @@
   
     <footer>
       <legal>
  -      Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
  +      Copyright (c) @year@ The Avalon Apache Project All rights reserved.
         $Revision$ $Date$
       </legal>
     </footer>
  
  
  
  1.4       +19 -4     avalon-sandbox/meta/site/xdocs/tools/tags/context.xml
  
  Index: context.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/context.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- context.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ context.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -11,7 +11,23 @@
   
       <section name="Javadoc Tags">
         <subsection name="Context Tag">
  -<p>The context tag enables the declaration of a custom context interface argument.</p>
  +<p>The context tag enables the declaration of a custom context interface classname that a component may safely cast a supplied context instance to.</p>
  +      </subsection>
  +
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td><p>type</p></td><td><p>no</p></td>
  +            <td>
  +              <p>The classname of the interface that the component 
  +                 may cast a supplied context argument to.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Example">
   
   <source><![CDATA[
   package net.osm;
  @@ -43,8 +59,7 @@
       <version>1.3.0</version>
       <name>primary-component</name>
     </info>
  -  <context type="net.osm.CustomComponent" version="1.0.0">
  -  </context>
  +  <context type="net.osm.CustomComponent"/>
   </type>
   ]]></source>
         </subsection>
  
  
  
  1.4       +33 -1     avalon-sandbox/meta/site/xdocs/tools/tags/dependency.xml
  
  Index: dependency.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/dependency.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dependency.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ dependency.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -12,6 +12,38 @@
       <section name="Javadoc Tags">
         <subsection name="Dependency Tag">
   <p>Component types may declare multiple service dependencies through the service tag.  Each service tag references a versioned service identifier that the container will supply to the component type on request relative to the declared dependency key.</p>
  +      </subsection>
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td>type</td><td>yes</td>
  +            <td>
  +              <p>The service interface classname that the component is dependent on.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>version</td><td>no</td>
  +            <td>
  +              <p>
  +                The service version.
  +                If not declared the service dependency shall match any version.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>optional</td><td>no</td>
  +            <td>
  +              <p>
  +               A value of 'true' or 'false'.  If true, the supply of a dependency
  +               is at the discression of the container.  If false (the default) 
  +               a container is required to resolve and supply a service matching 
  +               the dependency declaration.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +      <subsection name="Example">
  +
   
   <source><![CDATA[
   package net.osm;
  
  
  
  1.4       +54 -4     avalon-sandbox/meta/site/xdocs/tools/tags/entry.xml
  
  Index: entry.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/entry.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- entry.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ entry.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -12,10 +12,58 @@
       <section name="Javadoc Tags">
   
         <subsection name="Entry Tag">
  -<p>The entry tag declares a context entry required by a component.  The component is supplied the context entry via a context argument as part of the contextualization lifecycle stage. Context entries my declare a object type or array of object types.  If the type is not declared java.lang.String is assumed.  Context entries may be declared as option.  The default behaviour is to assume that a context entry is required.</p>
  +<p>The entry tag declares a context entry required by a component.  The component is supplied the context entry via a context argument as part of the contextualization lifecycle stage. Context entries my declare a object type or array of object types.  If the type is not declared java.lang.String is assumed.  Context entries may also be declared as option and/or volatile.  The default behaviour is to assume that a context entry is required (not optional) is is not volatile.</p>
  +      </subsection>
  +
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td><p>key</p></td><td><p>yes</p></td>
  +            <td>
  +              <p>The context entry lookup key.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td><p>alias</p></td><td><p>no</p></td>
  +            <td>
  +              <p>Declaration of an alternative name that the component 
  +                 may use to lookup the entry.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td><p>type</p></td><td><p>no</p></td>
  +            <td>
  +              <p>The classname of the context entry that the component 
  +                 may cast the contry to.  If not declared, java.lang.String
  +                 is assumed.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td><p>volatile</p></td><td><p>no</p></td>
  +            <td>
  +              <p>A value of true or false - if true a new instance of the 
  +                 context entry value shall be created and retured to the 
  +                 component per request. If false (the default) a container 
  +                 context implementation may safly cache context entry values
  +                 across requests.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td><p>optional</p></td><td><p>no</p></td>
  +            <td>
  +              <p>Declares the context entry as optional in which case 
  +                 the supply of the context entry is at the discretion 
  +                 of a container.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Example">
   
   <source><![CDATA[
  -package net.osm;
  +package org.apache.avalon.playground;
   
   /**
    * Example of a component declaring a context entry dependencies.
  @@ -25,7 +73,8 @@
   public class Primary implements Contextualizable
   {
      /**
  -    * @avalon.entry type="java.io.File" key="home" optional="true"
  +    * @avalon.entry key="home" type="java.io.File" optional="true"
  +    * @avalon.entry key="time" type="java.util.Date" volatile="true"
       * @avalon.entry key="table" type="java.lang.Object[]"
       * @avalon.entry key="name"
       */
  @@ -57,6 +106,7 @@
     </info>
     <context>
       <entry key="home" type="java.io.File" optional="true"/>
  +    <entry key="time" type="java.util.Date" optional="false" volatile="true"/>
       <entry key="table" type="java.lang.Object[]" optional="false"/>
       <entry key="name" type="java.lang.String" optional="false"/>
     </context>
  
  
  
  1.4       +19 -3     avalon-sandbox/meta/site/xdocs/tools/tags/extension.xml
  
  Index: extension.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/extension.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- extension.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ extension.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -13,6 +13,22 @@
   
         <subsection name="Extension Tag">
   <p>Lifecycle stages are resolved through the establishment of a component capable of service the stage dependency.  Component types declare this ability through the extension tag.</p>
  +      </subsection>
  +
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td><p>urn</p></td><td><p>yes</p></td>
  +            <td>
  +              <p>A value (normally a urn) that identifies the extension.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Example">
  +
   
   <source><![CDATA[
   package net.osm.vault;
  @@ -21,7 +37,7 @@
    * Example of a component declaring a stage handling capability.
    *
    * @avalon.component version="0.1" name="handler"
  - * @avalon.extension type="org.apache.avalon.plyground.Demonstratable"
  + * @avalon.extension id="urn:somewhere:demonstratable"
    */
   public class DemoExtension
   {
  @@ -38,7 +54,7 @@
       <name>handler</name>
     </info>
     <extensions>
  -    <extension type="org.apache.avalon.plyground.Demonstratable" version="1.0.0"/>
  +    <extension type="urn:somewhere:demonstratable"/>
     </extensions>
   </type>
   ]]></source>
  
  
  
  1.4       +8 -6      avalon-sandbox/meta/site/xdocs/tools/tags/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/index.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ index.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -19,7 +19,7 @@
   <table>
     <tr><th>Tag</th><th>Scope</th><th>Description</th></tr>
     <tr><td><a href="type.html">@avalon.component</a></td>
  -    <td>class</td><td>Identifies a class as a Type.</td></tr>
  +    <td>class</td><td>Identifies a class as a component Type.</td></tr>
     <tr><td><a href="attribute.html">@avalon.attribute</a></td>
       <td>class</td><td>An attribute associated with a containing type or service.</td></tr>
     <tr><td><a href="service.html">@avalon.service</a></td>
  @@ -29,13 +29,15 @@
     <tr><td><a href="extension.html">@avalon.extension</a></td>
       <td>class</td><td>Lifecycle stage handling capability declaration.</td></tr>
     <tr><td><a href="logger.html">@avalon.logger</a></td>
  -    <td>enableLogging()</td><td>Logging channel name declaration.</td></tr>
  +    <td>enableLogging</td><td>Logging channel name declaration.</td></tr>
  +  <tr><td><a href="configuration.html">@avalon.configuration</a></td>
  +    <td>configure</td><td>Configuration validation schema declaration.</td></tr>
     <tr><td><a href="context.html">@avalon.context</a></td>
  -    <td>contextualize()</td><td>Declaration of a specialized context class.</td></tr>
  +    <td>contextualize</td><td>Declaration of a specialized context class.</td></tr>
     <tr><td><a href="entry.html">@avalon.entry</a></td>
  -    <td>contextualize()</td><td>Context entry declaration.</td></tr>
  +    <td>contextualize</td><td>Context entry declaration.</td></tr>
     <tr><td><a href="dependency.html">@avalon.dependency</a></td>
  -    <td>service()</td><td>Service type dependency declaration.</td></tr>
  +    <td>service</td><td>Declaration of a service dependency.</td></tr>
   </table>
         </subsection>
       </section>
  
  
  
  1.4       +20 -4     avalon-sandbox/meta/site/xdocs/tools/tags/logger.xml
  
  Index: logger.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/logger.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- logger.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ logger.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -10,11 +10,27 @@
     <body>
   
       <section name="Javadoc Tags">
  +
         <subsection name="Logger Tag">
  -<p>The logger tag declares the name of a logging channel that is consumed by a component type.</p>
  +<p>
  +The logger tag declares the name of a logging channel that is consumed by a component type. The logging tag provides management information that may be used by a container during the establishment of logging categories and targets.
  +</p>
  +      </subsection>
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td>name</td><td>yes</td>
  +            <td>
  +              <p>The name of a subsidiary logging channel relative to the logging channel that is supplied to the component by the container.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +      <subsection name="Example">
   
   <source><![CDATA[
  -package net.osm;
  +package org.apache.avalon.playground;
   
   /**
    * Example of a component declaring the name of a logging channel.
  @@ -59,7 +75,7 @@
   
     <footer>
       <legal>
  -      Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
  +      Copyright (c) @year@ The Avalon Apache Project All rights reserved.
         $Revision$ $Date$
       </legal>
     </footer>
  
  
  
  1.5       +2 -1      avalon-sandbox/meta/site/xdocs/tools/tags/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/navigation.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- navigation.xml	15 Jul 2003 23:55:15 -0000	1.4
  +++ navigation.xml	26 Jul 2003 07:52:53 -0000	1.5
  @@ -19,10 +19,11 @@
         <item name="Meta Model" href="/meta/index.html"/>
         <item name="Tools" href="/tools/index.html">
           <item name="Javadoc Tags Reference" href="/tools/tags/index.html">
  -          <item name="Type" href="/tools/tags/type.html"/>
  +          <item name="Component" href="/tools/tags/type.html"/>
             <item name="Attribute" href="/tools/tags/attribute.html"/>
             <item name="Service" href="/tools/tags/service.html"/>
             <item name="Logger" href="/tools/tags/logger.html"/>
  +          <item name="Configuration" href="/tools/tags/configuration.html"/>
             <item name="Context" href="/tools/tags/context.html"/>
             <item name="Entry" href="/tools/tags/entry.html"/>
             <item name="Dependency" href="/tools/tags/dependency.html"/>
  
  
  
  1.4       +29 -7     avalon-sandbox/meta/site/xdocs/tools/tags/service.xml
  
  Index: service.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/service.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- service.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ service.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -12,17 +12,39 @@
       <section name="Javadoc Tags">
   
         <subsection name="Service Tag">
  -<p>Compoent types can declare their ability to provide services via the service tag.  A component type may declare 0..n service export declarations.</p>
  +<p>The service tag when used within a class declares the ability of the compoent type to export one or more work interfaces. Under class scope a component may declare 0..n service export declarations.  When used within an interface, the tag declares the interface as a managable service.  A service tag may appear once in a interface defintion.</p>
  +      </subsection>
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td>type</td><td>required in class scope</td>
  +            <td>
  +              <p>The service interface classname. This attribute is automatically
  +                 assigned the interface classname when declared in an interface.</p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>version</td><td>no</td>
  +            <td>
  +              <p>
  +                The service version.
  +                If not declared the service export is assumed to be version 1.0.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +      <subsection name="Example">
   
   <source><![CDATA[
  -package net.osm.vault;
  +package org.apache.avalon.playground;
   
   /**
    * Example of a component declaring export of a set of services.  
    *
    * @avalon.component version="5.1" name="vault"
  - * @avalon.service type="net.osm.vault.Vault;
  - * @avalon.service type="net.osm.vault.KeystoreHandler" version="2.1.1;
  + * @avalon.service type="somwhere.Vault;
  + * @avalon.service type="somwhere.KeystoreHandler" version="2.1.1;
    */
   public class DefaultVault implements Vault, KeystoreHandler
   {
  @@ -39,8 +61,8 @@
       <name>vault</name>
     </info>
     <services>
  -    <service type="net.osm.vault.Vault" version="1.0.0"/>
  -    <service type="net.osm.vault.KeystoreHandler" version="2.1.1"/>
  +    <service type="somwhere.Vault" version="1.0.0"/>
  +    <service type="somwhere.KeystoreHandler" version="2.1.1"/>
     </services>
   </type>
   ]]></source>
  
  
  
  1.4       +19 -3     avalon-sandbox/meta/site/xdocs/tools/tags/stage.xml
  
  Index: stage.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/stage.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- stage.xml	24 Jul 2003 12:12:01 -0000	1.3
  +++ stage.xml	26 Jul 2003 07:52:53 -0000	1.4
  @@ -12,6 +12,22 @@
       <section name="Introduction">
         <subsection name="Stage Tag">
   <p>A component type may declare a dependency on an arbitary number of lifecycle stages.  Each stage corresponds to a lifecycle extension that will be applied to the component in the order corresponding to the ordering of stage tags.  A container is responsible for the construction and deployment of an extension stage handler (refered to as an extension) capable of servicing the stage dependency.</p>
  +      </subsection>
  +
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td><p>urn</p></td><td><p>yes</p></td>
  +            <td>
  +              <p>A value (normally a urn) that identifies an entension 
  +                 to be applied to the component during deployment.</p>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Example">
   
   <source><![CDATA[
   package net.osm.vault;
  @@ -22,7 +38,7 @@
    * Example of a component declaring a stage dependency.
    *
    * @avalon.component version="0.1" name="extended-component"
  - * @avalon.stage type="org.apache.avalon.playground.Demonstratable"
  + * @avalon.stage id="urn:somewhere:demonstratable"
    */
   public class DemoComponent implements Demonstratable
   {
  @@ -39,7 +55,7 @@
       <name>extended-component</name>
     </info>
     <stages>
  -    <stage type="org.apache.avalon.plyground.Demonstratable" version="1.0.0"/>
  +    <stage type="urn:somewhere:demonstratable"/>
     </stages>
   </type>
   ]]></source>
  
  
  
  1.3       +49 -4     avalon-sandbox/meta/site/xdocs/tools/tags/type.xml
  
  Index: type.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/site/xdocs/tools/tags/type.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- type.xml	24 Jul 2003 12:12:01 -0000	1.2
  +++ type.xml	26 Jul 2003 07:52:53 -0000	1.3
  @@ -11,11 +11,56 @@
   
       <section name="Javadoc Tags">
   
  -      <subsection name="Type Tag">
  -<p>The type tag declares a jave source to a component type.  The type tag is a required when generating a type descriptor.</p>
  +      <subsection name="Component Tag">
  +<p>The component tag declares a java source as a component type.  The tag is a required when generating a component type descriptor.</p>
  +      </subsection>
  +
  +      <subsection name="Attributes">
  +        <table>
  +          <tr><th>Attribute</th><th>Required</th><th>Description</th></tr>
  +          <tr>
  +            <td>name</td><td>yes</td>
  +            <td>
  +            <p>The name representing the component type. </p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>version</td><td>no</td>
  +            <td>
  +              <p>
  +              The version used for this component implementation. 
  +              If not supplied a default version of 1.0 is assumed.
  +              </p>
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>lifestyle</td><td>no</td>
  +            <td>
  +              <p>
  +                The lifestyle that the component was designed for. The 
  +                lifestyle may be one of four predefined values. A compliant 
  +                container is not required to provide equivalent lifestyle 
  +                support, however, a container is required to recognize and 
  +                reject a component that it cannot support.
  +              </p>
  +              <p>If not declared, a container may assume the transient lifestyle.</p>
  +              <p>Recognized lifestyle attribute values include:</p>
  +              <ul>
  +                <li>singleton - an instance may be shared between 
  +                    multiple clients</li>
  +                <li>thread - one instance per thread</li>
  +                <li>pooled - each client has a unique instance managed by a pool</li>
  +                <li>transient - new instance are created on demand</li>
  +              </ul>
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
  +
  +      <subsection name="Example">
   
   <source><![CDATA[
  -package net.osm;
  +package org.apache.avalon.playground;
   
   /**
    * Example of the declaration of named component type.
  
  
  
  1.2       +15 -4     avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/ExtensionTag.java
  
  Index: ExtensionTag.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/ExtensionTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExtensionTag.java	10 Jul 2003 12:10:40 -0000	1.1
  +++ ExtensionTag.java	26 Jul 2003 07:52:53 -0000	1.2
  @@ -71,6 +71,11 @@
       public static final String KEY = "extension";
   
      /**
  +    * The stage tag id parameter name.
  +    */
  +    public static final String ID_PARAM = "urn";
  +
  +   /**
       * The extension tag constructor.
       * @param clazz the javadoc class descriptor.
       */
  @@ -86,17 +91,23 @@
       public ExtensionDescriptor[] getExtensions()
       {
           final ArrayList list = new ArrayList();
  -        final DocletTag[] tags = getJavaClass().getTagsByName( getNS() + Tags.DELIMITER + KEY );
  +        final DocletTag[] tags = 
  +          getJavaClass().getTagsByName( getNS() + Tags.DELIMITER + KEY );
           for( int i = 0; i < tags.length; i++ )
           {
               list.add( getExtension( tags[i] ) );
           }
  -        return (ExtensionDescriptor[])list.toArray( new ExtensionDescriptor[ list.size() ] );
  +        return (ExtensionDescriptor[])list.toArray( 
  +          new ExtensionDescriptor[ list.size() ] );
       }
   
       private ExtensionDescriptor getExtension( DocletTag tag )
       {
  -        final String value = getNamedParameter( tag, TYPE_PARAM );
  +        String value = getNamedParameter( tag, TYPE_PARAM, null );
  +        if( value == null )
  +        {
  +            value = getNamedParameter( tag, ID_PARAM );
  +        }
           final String type = resolveType( value );
           return new ExtensionDescriptor( type );
       }
  
  
  
  1.2       +16 -5     avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/StageTag.java
  
  Index: StageTag.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/StageTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StageTag.java	10 Jul 2003 12:10:41 -0000	1.1
  +++ StageTag.java	26 Jul 2003 07:52:53 -0000	1.2
  @@ -70,11 +70,16 @@
       public static final String KEY = "stage";
   
      /**
  -    * The stage tag type parameter name.
  +    * The stage tag type parameter name (deprecated see id).
       */
       public static final String TYPE_PARAM = "type";
   
      /**
  +    * The stage tag id parameter name.
  +    */
  +    public static final String ID_PARAM = "urn";
  +
  +   /**
       * Stage tag constructor.
       * @param clazz the javadoc class descriptor
       */
  @@ -86,12 +91,14 @@
      /**
       * Return an array of StageDescriptor instances based on declared 'stage' tags.
       * @return the stage descriptors
  -    * @exception IllegalArgumentException if the tag is declared but does not contain a value
  +    * @exception IllegalArgumentException if the tag is declared but does not 
  +    *   contain a value
       */
       public StageDescriptor[] getStages()
       {
           final ArrayList list = new ArrayList();
  -        final DocletTag[] tags = getJavaClass().getTagsByName( getNS() + Tags.DELIMITER + KEY );
  +        final DocletTag[] tags = 
  +          getJavaClass().getTagsByName( getNS() + Tags.DELIMITER + KEY );
           for( int i = 0; i < tags.length; i++ )
           {
               list.add( getStage( tags[i] ) );
  @@ -101,7 +108,11 @@
   
       private StageDescriptor getStage( DocletTag tag )
       {
  -        final String value = getNamedParameter( tag, TYPE_PARAM );
  +        String value = getNamedParameter( tag, TYPE_PARAM, null );
  +        if( value == null )
  +        {
  +            value = getNamedParameter( tag, ID_PARAM );
  +        }
           final String type = resolveType( value );
           return new StageDescriptor( type );
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org