A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/602.html
Document ID: 602
Branch: main
Language: default
Name: Configuring Coplets (unchanged)
Document Type: Document (unchanged)
Updated on: 8/12/05 10:24:26 PM
Updated by: Helma
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 12505 bytes (previous version: 12503 bytes)
Content diff:
(2 equal lines skipped)
<h1>Overview</h1>
--- <p>This document gives an overview over configuring coplets. The sample
portal
--- that comes with the Cocoon distribution contains several samples.</p>
+++ <p>This document gives an overview of how to configure coplets. The sample
+++ portal that comes with the Cocoon distribution contains several samples.</p>
<p>The configuration of a coplet is done in several steps that are outlined
in
the next chapters. We use the provided sample as a base. This sample stores
all
(16 equal lines skipped)
example, the uri based coplet triggers a uri to get the coplet - this can
be an
http request or an internal cocoon pipeline request.</p>
--- <p>Another exsample is the JSR-168 coplet type. This type allows to use
JSR-168
+++ <p>Another example is the JSR-168 coplet type. This type allows to use
JSR-168
compliant portlets for fetching the content. So let's start with the coplet
types:</p>
<h2>Available Coplet Types</h2>
<p>Before you can define your available coplets, you have to define the
--- available coplet types, or the so called coplet base data. The current
exsample
+++ available coplet types, or the so called coplet base data. The current
example
contains an XML document for this (the file is in the
profiles/copletbasedata
--- directory and is called portlal.xml). This is an excerpt from the file:</p>
+++ directory and is called portal.xml). This is an excerpt from the file:</p>
--- <pre>
--- ...
+++ <pre>...
<coplets>
<coplet-base-data id="URICoplet">
<coplet-adapter>uri</coplet-adapter>
(5 equal lines skipped)
<p>In the example above, we define one coplet type, the <em>URICoplet</em>,
that
uses the <em>uri coplet adapter</em>. By this we define a type, that uses
URIs
to get the content of a coplet. A uri can either be targetted at a different
--- server (using http, ftp etc.) or it can be an internal cocoon pipeline
(using
+++ server (using http, ftp etc.) or it can be an internal Cocoon pipeline
(using
cocoon:).</p>
--- <p>You can add different coplet types with additional configuration here,
but
--- rarely have to touch this file as most is preconfigured already.</p>
+++ <p>You can add different coplet types with additional configuration here,
+++ however you rarely have to touch this file as most is preconfigured
already.</p>
<h2>Available Coplets</h2>
<p>Based on the coplet types, you can define the available coplets in your
--- portal application (= classes). In the example portal an own configuration
file
+++ portal application (= classes). In the example portal a configuration file
contains these so called coplet datas (it's in the profiles/copletdata
directory
and has the filename portal.xml). Here is an excerpt:</p>
--- <pre>
--- ...
+++ <pre>...
<coplets>
<coplet-data id="CZ Weblog" name="standard">
<title>CZ's Weblog</title>
<coplet-base-data>URICoplet</coplet-base-data>
<attribute>
<name>uri</name>
--- <value xsi:type="java:java.lang.String"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/news/liverss?feed=http://radio.weblogs.com/0107211/rss.xml</value>
+++ <value xsi:type="java:java.lang.String"
+++
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/news/liverss?feed=http://radio.weblogs.com/0107211/rss.xml</value>
</attribute>
<attribute>
<name>buffer</name>
(8 equal lines skipped)
...
</pre>
--- <p>Each coplet data contains a unique id and additional configuration. A
--- required configuration is the underlying coplet base data. In the example
above,
--- the <em>URICoplet</em> is used that we have configured in the previous
chapter.
--- </p>
+++ <p>Each coplet data contains a unique ID and additional configuration.
+++ Configuration of the underlying coplet base data is required. In the example
+++ above, the <em>URICoplet</em> is used that we have configured in the
previous
+++ section.</p>
<p>The above configured coplet data requires some configuration. This
configuration depends on the coplet type. In this case we use the URICoplet
and
(9 equal lines skipped)
<h2>Selected Coplets</h2>
--- <p>The selected coplets are described by the set of coplet instance datas
This
--- is again another XML document (that is stored in
profiles/copletinstancedata and
+++ <p>The selected coplets are described by the set of coplet instance datas.
This
+++ again is another XML document (that is stored in
profiles/copletinstancedata and
has the name portal.xml). Here is an excerpt:</p>
--- <pre>
--- ...
+++ <pre>...
<coplets>
<coplet-instance-data id="CZ Weblog-1" name="standard">
<coplet-data>CZ Weblog</coplet-data>
(4 equal lines skipped)
<p>The coplet instance data refers to its coplet data (the class) by
specifying
the unique ID. The instance itself has a unique ID as well that is
referenced
--- from the portal view. This id of the instance has only the be unique within
the
+++ from the portal view. This id of the instance has only to be unique within
the
scope of a user. Different users can have different instances with the same
id.
</p>
(10 equal lines skipped)
coplet data uses attributes. Apart from that the keys and the data types
are the
same. Let's have a look at an example:</p>
--- <pre>
--- ...
+++ <pre>...
<coplet-base-data id="URICoplet">
<coplet-adapter>uri</coplet-adapter>
<configuration>
(13 equal lines skipped)
...
</pre>
--- <p>As you can see in the exsample above, there is no real difference in
--- configuring a coplet type (base data) and a coplet class (coplet data) apart
+++ <p>As you can see in the example above, there is no real difference in
+++ configuring a coplet type (base data) and a coplet class (coplet data)
except
that the first one uses the element name <em>configuration</em> and the
last one
uses <em>attribute</em>.</p>
(15 equal lines skipped)
value. This integer value (default is endless) defines the maximum time (in
seconds) the coplet has to deliver it's content.</p>
--- <p>If the timeout is reached the content is assumed as not gettable. If you
set
--- a timeout, the content is automatically buffered and the <em>buffer</em>
+++ <p>If the timeout is reached the content is assumed as not retrievable. If
you
+++ set a timeout, the content is automatically buffered and the <em>buffer</em>
configuration is ignored.</p>
<h1>The URICoplet</h1>
<p>This section describes the URICoplet and the different possibilities to
--- configure it. For general configuration see the previous chapter.</p>
+++ configure it. For general configuration see the previous section.</p>
<h2>The Content Location and Parameter Handling</h2>
(4 equal lines skipped)
<p>The attribute <em>uri</em> takes the complete uri (as a string) to fetch
the
content from:</p>
--- <pre>
--- ...
+++ <pre>...
<coplet-data id="CZ Weblog" name="standard">
<title>CZ's Weblog</title>
<coplet-base-data>URICoplet</coplet-base-data>
(37 equal lines skipped)
<p>This is configurable by the boolean aspect <em>sizable</em> on the coplet
data (class). The default is true:</p>
--- <pre>
--- ...
+++ <pre>...
<coplet-data id="CZ Weblog" name="standard">
<title>CZ's Weblog</title>
<coplet-base-data>URICoplet</coplet-base-data>
(11 equal lines skipped)
as well by the integer aspect value <em>size</em>. The value <em>0</em>
means
minimized and <em>1</em> is maximized (with 1 as the default).</p>
--- <pre>
--- ...
+++ <pre>...
<coplet-data id="CZ Weblog" name="standard">
<title>CZ's Weblog</title>
<coplet-base-data>URICoplet</coplet-base-data>
(9 equal lines skipped)
<h2>Mandatory Coplets</h2>
--- <p>By default, the user can delete any coplet from his portal view. However
+++ <p>By default, the user can delete any coplet from his portal view. However,
important coplets can be configured as <em>mandatory</em>. In this case, the
remove icon is not displayed, and the coplet can never be removed by the
user.
</p>
<p>This is configurable by the boolean aspect <em>mandatory</em> on the
coplet
data (class). The default is false:</p>
--- <pre>
--- ...
+++ <pre>...
<coplet-data id="CZ Weblog" name="standard">
<title>CZ's Weblog</title>
<coplet-base-data>URICoplet</coplet-base-data>
(12 equal lines skipped)
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
Removed from collection: legacydocs
Added to collection: documentation