You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ts...@apache.org on 2005/03/19 16:03:19 UTC
svn commit: r158241 -
lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml
Author: tschlabach
Date: Sat Mar 19 07:03:17 2005
New Revision: 158241
URL: http://svn.apache.org/viewcvs?view=rev&rev=158241
Log:
Added some more remarks to the introduction section of the document.
Modified:
lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml
Modified: lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml?view=diff&r1=158240&r2=158241
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/1_4/concepts/usecase-framework/index.xml Sat Mar 19 07:03:17 2005
@@ -23,6 +23,40 @@
<section>
<title>Introduction</title>
+ <p>A usecase in Lenya means a user triggered action. In most cases, a usecase is triggered by a CMS menu option on
+ a specific document of the publication. This document is the object of the usecases' action (such as edit, delete, publish, ...).</p>
+ <p>There are usecases which are independent of a specific document, such as the <code>ac.logout</code> usecase. In that case it does
+ not matter on what document the usecase is triggered. The part of the request which specifies the document is simple ignored
+ by usecases that are document independent.</p>
+ <p>The CMS menus trigger usecases by setting the lenya.usecase request parameter on the current document. If for example
+ the user selects the Publish option from the Workflow menu, a request will be triggered such as:</p>
+
+<code>
+ GET http://www.server.com/lenya/default/authoring/tutorial.html?&lenya.event=publish&lenya.usecase=publish
+</code>
+ <p>The <code>lenya.event</code> parameter belongs to the Lenya workflow framework and can be ignored here. I can even be left
+ out and the usecase will still work fine, but workflow actions will not be triggered.</p>
+ <p>The Lenya <code>global-sitemap.xmap</code> will redirect requests with a lenya.usecase request parameter to the
+ <code>$LENYA_WEBAPP/lenya/usecase.xmap</code>
+ sub-sitemap. From version 1.4 on, the following pipeline in this sitemap is used to recognonize usecases which are implemented
+ in Java using the new 1.4 usecase framework:</p>
+<source xml:space="preserve"><![CDATA[
+<map:pipeline>
+ <map:match type="registered-usecase">
+ <map:mount src="usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>
+ </map:match>
+</map:pipeline>]]>
+</source>
+ <p>The <code>registered-usecase</code> matcher's default implementation
+ (<code>org.apache.lenya.cms.cocoon.matching.UsecaseRegistrationMatcher</code>) will use the Avalon
+ component resolver mechanism to resolve the name of the usecase to a an Avalon component. In case it cannot
+ resolve the usecase to an Avalon component, sitemap processing will continue and the usecase is treated in the
+ traditional way using the <code>usecase</code> and <code>step</code> matchers
+ (<code>org.apache.cocoon.matching.WildcardRequestParameterMatcher</code>). In order for this to work
+ correctly, there should be a <code>lenya.step</code> parameter in the request.</p>
+ <p>If the usecase could be resolved successfully into an avalon component, processing will continue in the
+ <code>$LENYA_WEBAPP/lenya/usecases/usecase.xmap</code> (as opposed to <code>$LENYA_WEBAPP/lenya/usecase.xmap</code>) with
+ the new JX and Java based 1.4 usecase framework.</p>
<p>
The <em>usecase framework</em> in Lenya 1.4 is a simple framework to implement usecases using JX templates and Java.
This approach is an "85% solution". It enables the user to implement a big range of common usecases.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org