A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/797.html
Document ID: 797
Branch: main
Language: default
Name: BD: Tutorial: Using the block deployer to create a Cocoon web application
(unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 1/12/06 6:44:05 AM
Updated by: Reinhard Pötz
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 11802 bytes (previous version: 10759 bytes)
Content diff:
(217 equal lines skipped)
<h2>Explicit connections</h2>
--- <p>You specify, which block implementations you want to use to satisfy a
blocks
--- requirements:</p>
+++ <p>If you want to find out which dependencies your block has, look into it's
+++ block.xml</p>
+++ <pre><block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+++ id="com.mycompany:myBlock:1.0">
+++ ...
+++ <requirements>
+++ <requires
+++ <strong>interface="http://the-contract-URI"</strong>
+++ name="xyz"
+++ default="my-group:my-artifact:1.0.2"/>
+++ </requires>
+++ <requirements>
+++ ...
+++ </block></pre>
+++
+++ <p>It's important to know, that a block's requirements are contracts
(expressed
+++ as URI) and not concrete block implementations. The default attribute is a
+++ concrete implementation of the contract. The default value is used in the
case
+++ of auto-wiring which is explained later in this document.</p>
+++
+++ <p>In your deployment script, you specify, which block implementations you
want
+++ to use to satisfy a blocks requirements:</p>
+++
<pre><deploy xmlns="http://apache.org/cocoon/blocks/deploy/1.0">
...
<block id="blockA" urn="mycompany:blockA:1.0.0">
(7 equal lines skipped)
</deploy>
</pre>
+++ <p>So that this works, mycompany:blockC:1.0.0 must have following entries
in its
+++ block.xml:</p>
+++
+++ <pre><block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+++ id="mycompany:blockC:1.0.0">
+++ ...
+++ <implements>
+++
<interface><strong>http://the-contract-URI</strong></interface>
+++ </implements>
+++ ...
+++ </block></pre>
+++
<p>This is an explicit connection as your connection with the name
"database"
--- points to the block with the id "blockC". Of course, "blockC" must be
available
--- within your deployment script.</p>
+++ points to the block with the id "blockC".</p>
<h2>Run it</h2>
(115 equal lines skipped)
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
no changes