Date: 2004-03-17T12:35:26
   Editor: AaronFarr <[EMAIL PROTECTED]>
   Wiki: Apache Avalon Wiki
   Page: AvalonStandards
   URL: http://wiki.apache.org/avalon/AvalonStandards

   added meta examples -farra

Change Log:

------------------------------------------------------------------------------
@@ -37,6 +37,7 @@
     * Component contract -- how component developers specify meta-info
     * Container contract -- how container developers or extension writers retrieve 
meta-info
   * Context Entries (see AvalonContextSurvey)
+  * API  (updates to framework itself)
   * Configuring Components
   * Assembling Components (how to map components together and decide which ones to 
load)
   * Distribution Format
@@ -49,15 +50,112 @@
   * http://avalon.apache.org/meta/
   * Defines a set of javadoc tags: http://avalon.apache.org/meta/tools/tags/index.html
   * Defines a "meta-model" based around the idea of a ''Type'' : 
http://avalon.apache.org/meta/meta/index.html
+{{{
+  <type>
+    <info>
+      <name>my-component</name>
+      <version>1.2.1</version>
+      <attributes>
+         <attribute key="color" value="blue"/>
+         <attribute key="quantity" value="35"/>
+      </attributes>
+    </info>
+
+    <loggers>
+      <logger name="store"/>
+      <logger name="store.cache"/>
+      <logger name="verifier"/>
+    </loggers>
+
+    <context type="MyContextInterface">
+      <entry key="base" type="java.io.File"/>
+      <entry key="mode" optional="TRUE"/>
+    </context>
+
+    <services>
+      <service>
+        <reference type="SimpleService" version="3.2">
+        <attributes/>
+      </service>
+    </services>
+
+    <dependencies>
+      <dependency optional="FALSE"
+        key="my-transformer"
+        type="org.apache.cocoon.api.Transformer
+        version="1.1">
+        <attributes/>
+      </dependency>
+    </dependencies>
+  </type>
+}}}
 
 '''Fortress Meta'''
+  * uses a '.meta' properties file
+  * uses a list of service files in the META-INF directory
   * http://avalon.apache.org/excalibur/fortress/using-meta-info.html
+Example of .meta
+{{{
+#Meta information for org.apache.avalon.fortress.examples.components.TranslatorImpl
+#Mon Mar 08 10:59:53 EST 2004
+x-avalon.lifestyle=singleton
+x-avalon.name=translator
+}}}
+Example of META-INF/services/org.apache.avalon.fortress.examples.components.Translator
+{{{
+org.apache.avalon.fortress.examples.components.TranslatorImpl
+}}}
 
-'''ECM Roles Files'''
+'''ECM/Fortress Roles Files'''
   * Also supported by Fortress
+Example from avalon-standbox/examples:
+{{{
+<?xml version="1.0"?>
+
+<fortress-roles logger="system.roles">
+
+  <role name="org.apache.avalon.examples.simple.Simple">
+    <component shorthand="simple"
+               class="org.apache.avalon.examples.simple.impl.SimpleConfigurationImpl"
+               
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
+  </role>
+
+</fortress-roles>
+}}}
 
 '''Phoenix .xinfo'''
   * Phoenix .xinfo files: http://avalon.apache.org/phoenix/bdg/doclet-tags.html
+  * Example:
+{{{
+<?xml version="1.0"?>
+
+<blockinfo>
+
+    <block>
+        <version>1.2.3</version>
+    </block>
+
+    <services>
+        <service name="com.biz.cornerstone.services.MyService"
+                 version="2.1.3" />
+    </services>
+
+    <dependencies>
+        <dependency>
+            <role>com.biz.cornerstone.services.Authorizer</role>
+            <service name="com.biz.cornerstone.service.Authorizer"
+                     version="1.2"/>
+        </dependency>
+        <dependency>
+            <!-- note that role is not specified and defaults
+                 to name of service. The service version is not
+                 specified and it defaults to "1.0" -->
+            <service name="com.biz.cornerstone.service.RoleMapper"/>
+        </dependency>
+    </dependencies>
+
+</blockinfo>
+}}}
 
 '''Commons Attributes'''
   * Commons-Attributes compiled-in attributes - yep, this one started as an attempt 
to solve the metainfo issue by defining a generic API to access attributes: 
http://marc.theaimsgroup.com/?l=avalon-dev&m=105974933614920&w=2
@@ -104,6 +202,8 @@
 Comment from leosutic: Sure. That solves backwards compatibility. But it'd be nice to 
have one canonical name for the thing, just for the sake of reducing the number of 
names for the same thing.
 
 = API =
+
+There are some updates to the framework itself which may need to be made:
 
   * Selectors
   * Marker interfaces - some of them are part of framework, some not.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to