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>&lt;block xmlns="http://apache.org/cocoon/blocks/cob/1.0";
+++   id="com.mycompany:myBlock:1.0"&gt;
+++   ...
+++   &lt;requirements&gt;
+++     &lt;requires 
+++       <strong>interface="http://the-contract-URI";</strong>
+++       name="xyz"
+++       default="my-group:my-artifact:1.0.2"/&gt;
+++    &lt;/requires&gt;
+++   &lt;requirements&gt;
+++   ...
+++ &lt;/block&gt;</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>&lt;deploy  xmlns="http://apache.org/cocoon/blocks/deploy/1.0"&gt;
      ...
      &lt;block id="blockA" urn="mycompany:blockA:1.0.0"&gt;
(7 equal lines skipped)
    &lt;/deploy&gt;
    </pre>
    
+++ <p>So that this works, mycompany:blockC:1.0.0 must have following entries 
in its
+++ block.xml:</p>
+++ 
+++ <pre>&lt;block xmlns="http://apache.org/cocoon/blocks/cob/1.0";
+++   id="mycompany:blockC:1.0.0"&gt;
+++   ...
+++   &lt;implements&gt;
+++     
&lt;interface&gt;<strong>http://the-contract-URI</strong>&lt;/interface&gt;  
+++   &lt;/implements&gt;
+++   ...
+++ &lt;/block&gt;</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