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 2002/06/23 15:22:05 UTC

cvs commit: jakarta-avalon-excalibur/containerkit/src/doc example.xinfo

mcconnell    2002/06/23 06:22:05

  Added:       containerkit/src/doc example.xinfo
  Log:
  Example of a fully populated xinfo file consitent with the metainfo package ComponentInfo model.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/containerkit/src/doc/example.xinfo
  
  Index: example.xinfo
  ===================================================================
  
  <!--
  Example of a component meta info external XML form. 
  The element contains the information required to construct an instance of
  org.apache.excalibur.containerkit.metainfo.ComponentInfo.  It includes 
  information about the component type, the service it provides, and the 
  services it is dependent on.
  
  author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
  version $Revision: 1.1 $ $Date: 2002/06/23 13:22:05 $
  -->
  
  <component-info>
  
  
    <!--
    Defintion of the component descriptor.
    -->
  
    <component>
  
      <!-- the name of the component (character restriction appply) -->
  
      <name>my-component<name>
  
      <!-- the implementation version -->
  
      <version>1.2.1</version>
  
      <!-- the set of attribibutes associated with the type
           (attribute names and values are examples only) -->
  
      <attributes>
  
         <attribute key="avalon:display-name-i18n" value="display-name"/>
         <attribute key="avalon:lifestyle" value="THREAD_SAFE"/>
  
      </attributes>
  
    </component>
  
    <!-- 
    Declaration of the context constraints for the compoent type. 
    The "type" attribute is the name of an interface derived from the default
    contenxt interface org.apache.avalon.framework.context.Context 
    -->
  
    <context type="MyContextInterface">
  
      <!-- 
      Declaration of an entry in a context object, the "key" is
      the key used by a component to locate the context entry,
      the "type" is the classname of value (typically an interface)
      or primative type.  The default value is java.lang.String.
      The "optional" attribute is a boolean value derived from the 
      TRUE or FALSE that indicates if the context value must be 
      provided or not (default is FALSE). 
      -->
  
      <entry key="base" type="java.io.File"/>
      <entry key="mode" optional="TRUE"/>
  
    </context>
  
    <!--
    Declaration of the set of services that this component is capable 
    of supplying.  Each service declarared under the services element
    may be referenced by other component info descriptions as a 
    dependecy.  A container is responsible for the assemably of 
    components based on the connection of supply components to 
    consumer components via a common service description. 
    -->
  
    <services>
  
        <!-- 
        The service type is the classname of an interface and the
        version identifier qualifes the interface version.  The 
        default version value is 1.0.
        -->
  
        <service type="SimpleService" version="3.2">
  
          <attributes>
  
             <!--
             Service type attributes go here.
             Need some relevant examples. 
             -->
  
          </attributes>
  
        </service>
  
    </services>
  
  
    <!-- 
    Declaration of the set of dependecies that this component type has on 
    component suppliers.  Dependecy declarations define the role name name
    that a consumer component will use to access a service via a service
    or component manager.  The service element identifies a service 
    descriptor that is publised by a potential supplier component. 
    -->
  
    <dependencies>
  
      <!-- A dependecy declaration. -->
  
      <dependency>
  
        <!-- 
        The role name that the component will use as the argument to 
        lookup. The default value is the value of the service type 
        attribute listed below.
        -->
  
        <role>my-transformer</role>
  
        <!-- 
        service reference containing the classname of the service interface
        and the version value where version defaults to 1.0 
        -->
  
        <service type="org.apache.cocoon.api.Transformer" version="1.1"/>
  
        <!-- the set of attributes associated with the dependecy -->
  
        <attributes>
  
             <!-- 
             Service type constraints go here.
             Need some relevant examples. 
             -->
  
        </attributes>
  
      </dependency>
  
    </dependencies>
  
  </component-info>
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>