mcconnell 2003/08/16 21:54:04
Modified: merlin/merlin-platform/xdocs/meta/model/kernel
navigation.xml
merlin/merlin-platform/xdocs/starting/advanced includes.xml
navigation.xml
merlin/merlin-platform/xdocs/starting/tutorial/context
casting.xml
Log:
Housekeeping.
Revision Changes Path
1.5 +1 -0
avalon-sandbox/merlin/merlin-platform/xdocs/meta/model/kernel/navigation.xml
Index: navigation.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/meta/model/kernel/navigation.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- navigation.xml 17 Aug 2003 04:19:15 -0000 1.4
+++ navigation.xml 17 Aug 2003 04:54:04 -0000 1.5
@@ -23,6 +23,7 @@
<item name="Logging" href="/meta/model/kernel/logging.html"/>
<item name="Categories"
href="/meta/model/kernel/categories/index.html"/>
<item name="Repository"
href="/meta/model/kernel/repository/index.html"/>
+ <item name="Container" href="/meta/model/block/container/index.html"/>
</item>
<item name="Container" href="/meta/model/block/container/index.html"/>
</item>
1.6 +11 -141
avalon-sandbox/merlin/merlin-platform/xdocs/starting/advanced/includes.xml
Index: includes.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/advanced/includes.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- includes.xml 16 Aug 2003 11:16:34 -0000 1.5
+++ includes.xml 17 Aug 2003 04:54:04 -0000 1.6
@@ -9,16 +9,11 @@
</header>
<body>
<section name="Advanced Features">
- <subsection name="Block Includes">
+ <subsection name="Containment Includes">
<p>
- A block directive may include other blocks via the <include>
- statement. This tutorial describes how to use include elements
- and how muiltiple external configurations can be wired together
- as part of a complex block defintion.
- </p>
- <p>
- Content supporting this tutorial is available under the
- tutorial/includes directory.
+ A container directive may include other containers via the <include>
+ statement. This tutorial describes how to use include elements to
+ wire together complex block defintions.
</p>
</subsection>
<subsection name="Sample Block">
@@ -27,17 +22,11 @@
</p>
<ul>
<li><p>a typical component directive</p></li>
- <li><p>inclusion of a block named "my-block" using an embeded override
target</p>
- <ul>
- <li>modification of the component configuration</li>
- <li>modification of the component logging priority</li>
- </ul>
- </li>
+ <li><p>inclusion of a block named "my-block"</p></li>
<li><p>a container named 'subcontainer', containing:</p>
<ul>
<li>another component</li>
- <li>an include with a external target configuration directive</li>
- <li>another include that contains other includes</li>
+ <li>another include</li>
</ul>
</li>
</ul>
@@ -56,30 +45,10 @@
<!--
Deomonstration of an include the establishes a subsidiary block named
"my-block"
- based on the block defintion "include.xml". The directives in the included
- block are qualified by the configuration targets embedded in the targets
- element.
+ based on the block defintion from the resource repository.
-->
- <include name="my-block">
- <source path="include.xml"/>
- <targets>
-
- <!--
- A target itentifies a component relative to the containing block.
- For example, the following target is referencing a component
- named "test3" contained with the block "my-block". The target
- contains a different configuration and an overriding logging
- category default priority for the component.
- -->
-
- <target path="/test3">
- <configuration>
- <source>embedded target configuration</source>
- </configuration>
- <categories priority="DEBUG"/>
- </target>
- </targets>
- </include>
+
+ <include name="my-block" id="cornerstone-store:cornerstone-store-impl"
version="SNAPSHOT"/>
<container name="subcontainer">
@@ -87,113 +56,14 @@
activation="startup"/>
<!--
- The following include demonstrates the importing of a
- target override file from an external source into a
- container. The imported block will be establish
- as a child of the containing block.
+ Inclusion of the block xml file.
-->
-
- <include name="include">
- <source path="include.xml"/>
- <targets path="include-config.xml"/>
- </include>
-
- <include name="composite">
- <source path="composite.xml"/>
- </include>
+ <include name="another-block" id="my-group:block" version="1.0" type="xml"/>
</container>
</container>
]]></source>
- <p>
- The above block.xml will create a component hierachy
- equivalent to the following:
- </p>
-<source>
-test1
-my-block
-my-block.test3
-subcontainer
-subcontainer.test2
-subcontainer.include
-subcontainer.include.test3
-subcontainer.composite.test.nested
-subcontainer.composite.test.nested.test3
-</source>
- </subsection>
- <subsection name="Sample Configuration">
- <p>
- In addition to the configuration target override values supplied
- under respective include directives, we can also declare a global
- configuration using the -config command line argument. The
- following configuration is used to execute the example.
- </p>
- <source><![CDATA[
-<targets>
-
- <!-- classic target configuration override declarations -->
-
- <target path="/test1">
- <configuration>
- <source>config.xml</source>
- </configuration>
- </target>
-
- <target path="/subcontainer/test2">
- <configuration>
- <source>config.xml</source>
- </configuration>
- </target>
-
- <!-- this target will override the config referenced in the include -->
-
- <target path="/subcontainer/include/test3">
- <configuration>
- <source>using config.xml file</source>
- </configuration>
- </target>
-
-</targets>
-]]></source>
- </subsection>
- <subsection name="Execution">
- <p>
- The build procedure will create a jar file names tutorial-1.0.jar
- and place it in you Merlin repository under the application name
- 'tutorial' with the resource name 'turotial'. As the jar files is
- available in the repository we can refererence the resouces without
- concern for the particular instalation that Merlin is running within.
- </p>
- <source><![CDATA[
-$ cd includes
-$ ant install
-$ merlin scr\config\block.xml -config src\config\config.xml
-]]></source>
- <p>
- The log output depicts the source of the configuration for each of
- components in the assembly.
- </p>
- <source><![CDATA[
-[INFO ] (sys): initialization: localhost
-[INFO ] (sys): commencing block assembly phase
-[INFO ] (test1): source: config.xml
-[INFO ] (sys): Block hierarchy established.
-[INFO ] (sys): commencing decommissioning phase
-[DEBUG ] (my-block.test3): configuration
-[INFO ] (my-block.test3): source: embedded target configuration
-[INFO ] (my-block): container initialization: my-block
-[INFO ] (subcontainer.test2): source: config.xml
-[INFO ] (subcontainer.include.test3): source: the include-config.xml file
-[INFO ] (subcontainer): container initialization: subcontainer
-[INFO ] (subcontainer.include): container initialization: include
-[INFO ] (subcontainer.composite): container initialization: composite
-[INFO ] (subcontainer.composite.test): container initialization: test
-[INFO ] (subcontainer.composite.test.nested.test3): source: embedded target
- in a nested include
-[INFO ] (subcontainer.composite.test.nested): container initialization:
- nested
-[INFO ] (sys): bye]]></source>
</subsection>
</section>
</body>
1.2 +1 -3
avalon-sandbox/merlin/merlin-platform/xdocs/starting/advanced/navigation.xml
Index: navigation.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/advanced/navigation.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- navigation.xml 10 Jun 2003 02:14:27 -0000 1.1
+++ navigation.xml 17 Aug 2003 04:54:04 -0000 1.2
@@ -22,9 +22,7 @@
<item name="Contextulization" href="/starting/advanced/context.html"/>
<item name="Deployment Templates"
href="/starting/advanced/profiles.html"/>
<item name="Profile Selectors" href="/starting/advanced/selectors.html"/>
- <item name="Block Includes" href="/starting/advanced/includes.html"/>
- <item name="Block Composition" href="/starting/advanced/composite.html"/>
- <item name="Custom Containers" href="/starting/advanced/containers.html"/>
+ <item name="Composition" href="/starting/advanced/composite.html"/>
</item>
<item name="Examples" href="/starting/examples/index.html"/>
</item>
1.3 +6 -7
avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/casting.xml
Index: casting.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/casting.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- casting.xml 17 Aug 2003 04:19:15 -0000 1.2
+++ casting.xml 17 Aug 2003 04:54:04 -0000 1.3
@@ -97,17 +97,16 @@
<p>
The following source is the implementation of the domain
specific context interface. The implementation class must include
- a constructor that takes a single map parameter. The supplied map
- contains the default conterxt entries together with any supplimentary
- context entries requested by the component type. The implementation
- provides convinence access to these context entries.
+ a constructor that takes a base context as single argument. The supplied
context
+ context entries requested by the component type and populated in accordance
with
+ the associated context directives.
</p>
<source>
package tutorial;
-import java.util.Map;
import java.io.File;
+import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.context.ContextException;
@@ -124,9 +123,9 @@
* the following constructor.
* @param entries a map of context entries
*/
- public DemoContextProvider( Map entries )
+ public DemoContextProvider( Context context )
{
- super( entries );
+ super( context );
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]