Document: Overview
URL:
https://lenya.zones.apache.org/cms/docu/live/docu20/reference/usecase-framework/usecase-framework-overview.html
Changed by user: Andreas Hartmann (andreas)
----
Removed: /comment()
Copyright 2002-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
----
Removed: /document/body/section[1]/p[4]/text()[5]
request parameter to the
----
Added: /document/body/section[1]/p[4]/text()[5]
request parameter to the
----
Removed: /document/body/section[1]/p[4]/code[3]/text()
$LENYA_WEBAPP/lenya/usecase.xmap
----
Added: /document/body/section[1]/p[4]/code[3]/text()
lenya/usecase.xmap
----
Removed: /document/body/section[1]/p[4]/text()[7]
sub-sitemap. From version 2.0 on, the following pipeline in this sitemap
is used to recognonize usecases which are implemented in Java using the
new 2.0 usecase framework:
----
Added: /document/body/section[1]/p[4]/text()[7]
sitemap. This sitemap is used to recognonize usecases which are implemented in
Java using the new Lenya 2.0 usecase framework:
----
Removed: /document/body/section[1]/source/text()
<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>
----
Added: /document/body/section[1]/source/text()
<map:pipeline> <map:match type="registered-usecase"> <map:mount
src="fallback://lenya/modules/usecase/usecase.xmap" uri-prefix=""
check-reload="yes" reload-method="synchron"/> </map:match></map:pipeline>
----
Removed: /document/body/section[1]/p[6]/code[1]/text()
$LENYA_WEBAPP/lenya/usecases/usecase.xmap
----
Added: /document/body/section[1]/p[6]/code/text()
sitemap.xmap
----
Removed: /document/body/section[1]/p[6]/text()[3]
(as opposed to
----
Removed: /document/body/section[1]/p[6]/code[2]
<code> (null)
----
Removed: /document/body/section[1]/p[6]/code[2]/text()
$LENYA_WEBAPP/lenya/usecase.xmap
----
Removed: /document/body/section[1]/p[6]/text()[5]
) with the new JX and Java based 2.0 usecase framework.
----
Added: /document/body/section[1]/p[6]/text()[3]
of the
----
Added: /document/body/section[1]/p[6]/em
<em> (null)
----
Added: /document/body/section[1]/p[6]/em/text()
usecase
----
Added: /document/body/section[1]/p[6]/text()[5]
module with the new JX and Java based 2.0 usecase framework.
----
Removed: /document/body/section[2]/section[1]
<section> (null)
----
Removed: /document/body/section[2]/section[1]/title
<title> (null)
----
Removed: /document/body/section[2]/section[1]/title/text()
The Lenya Core
----
Removed: /document/body/section[2]/section[1]/source
<source> (null)
----
Removed: /document/body/section[2]/section[1]/source/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Removed: /document/body/section[2]/section[1]/source/text()
$LENYA_WEBAPP /lenya/usecases usecase-related files
/usecase.xmap usecase dispatching sitemap
/usecases.js flowscript for usecase control flow /admin
Lenya admin usecases /addUser.jx JX
templates for usecase views ... more Lenya
core usecases
----
Removed: /document/body/section[2]/section[2]
<section> (null)
----
Removed: /document/body/section[2]/section[2]/title
<title> (null)
----
Removed: /document/body/section[2]/section[2]/title/text()
Your Publication
----
Removed: /document/body/section[2]/section[2]/source
<source> (null)
----
Removed: /document/body/section[2]/section[2]/source/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Removed: /document/body/section[2]/section[2]/source/text()
$PUB_HOME /lenya/usecases usecase-related files
/editHeadline.jx JX templates for usecase views /java/src/...
usecase handler classes
----
Added: /document/body/section[2]/p
<p> (null)
----
Added: /document/body/section[2]/p/text()
It is recommended to keep all usecases in modules for better reusability.
----
Added: /document/body/section[2]/source
<source> (null)
----
Added: /document/body/section[2]/source/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[2]/source/text()
$MODULE_HOME /java /src Usecase handler classes and
related classes /test Unit tests /usecases
Usecase-related files /**.jx JX templates or
usecase views /sitemap.xmap Callback pipelines
----
Removed: /document/body/section[3]/p[1]/text()[3]
- is dispatched by
----
Added: /document/body/section[3]/p[1]/text()[3]
- is dispatched by the
----
Removed: /document/body/section[3]/p[1]/code[2]/text()
$LENYA_WEBAPP/lenya/usecases/usecase.xmap
----
Added: /document/body/section[3]/p[1]/code[2]/text()
modules-core/usecase/sitemap.xmap
----
Removed: /document/body/section[3]/p[1]/code[3]/text()
$LENYA_WEBAPP/lenya/usecases/usecases.js
----
Added: /document/body/section[3]/p[1]/code[3]/text()
modules-core/usecase/usecases.js
----
Removed: /document/body/section[5]/section[1]/ol/li/text()[1]
Choose a name to identify the usecase, e.g. editHeadline. It is possible to
group usecases using "." as delimiter, for instance
----
Removed: /document/body/section[5]/section[1]/ol/li/code
<code> (null)
----
Removed: /document/body/section[5]/section[1]/ol/li/code/text()
article.editHeadline
----
Removed: /document/body/section[5]/section[1]/ol/li/text()[3]
.
----
Added: /document/body/section[5]/section[1]/ol/li/text()[1]
Choose a name to identify the usecase, e.g. editHeadline. The convention for
usecase names is
----
Added: /document/body/section[5]/section[1]/ol/li/em[1]
<em> (null)
----
Added: /document/body/section[5]/section[1]/ol/li/em[1]/text()
{module}.{usecase}
----
Added: /document/body/section[5]/section[1]/ol/li/text()[3]
, for instance
----
Added: /document/body/section[5]/section[1]/ol/li/em[2]
<em> (null)
----
Added: /document/body/section[5]/section[1]/ol/li/em[2]/text()
article.editHeadline
----
Added: /document/body/section[5]/section[1]/ol/li/text()[5]
for the
----
Added: /document/body/section[5]/section[1]/ol/li/em[3]
<em> (null)
----
Added: /document/body/section[5]/section[1]/ol/li/em[3]/text()
editHeadline
----
Added: /document/body/section[5]/section[1]/ol/li/text()[7]
usecase in the
----
Added: /document/body/section[5]/section[1]/ol/li/em[4]
<em> (null)
----
Added: /document/body/section[5]/section[1]/ol/li/em[4]/text()
article
----
Added: /document/body/section[5]/section[1]/ol/li/text()[9]
module.
----
Removed: /document/body/section[5]/section[3]/ol/li[1]/code/text()
org.myproject.lenya.usecases.EditHeadline
----
Added: /document/body/section[5]/section[3]/ol/li[1]/code/text()
org.myproject.lenya.article.EditHeadline
----
Removed: /document/body/section[5]/section[3]/ol/li[4]/source/text()
<xconf xpath="/cocoon/usecases"
unless="/cocoon/usecases/[EMAIL PROTECTED] = 'article.editHeadline']">
<component-instance name="article.editHeadline"
logger="lenya.usecases.editHeadline"
class="org.myproject.lenya.usecases.EditHeadline"/>
</xconf>
----
Added: /document/body/section[5]/section[3]/ol/li[4]/source/text()
<xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/[EMAIL
PROTECTED] = 'article.editHeadline']"> <component-instance
name="article.editHeadline"
logger="lenya.usecases.editHeadline"
class="org.myproject.lenya.article.EditHeadline"/></xconf>
----
Removed: /document/body/section[5]/section[4]/source[1]/text()
<component-instance ...>
<view template="usecases/article/editHeadline.jx" menu="false">
<parameter name="title" value="Edit Headline"/>
<parameter name="..." value="..."/>
</view>
</component-instance>
----
Added: /document/body/section[5]/section[4]/source[1]/text()
<component-instance …> <view
uri="modules/article/usecases/editHeadline.jx" menu="false"> <parameter
name="title" value="Edit Headline"/> <parameter name="…" value="…"/>
</view> </component-instance>
----
Removed: /document/body/section[5]/section[4]/p[4]/code[2]/text()
template
----
Added: /document/body/section[5]/section[4]/p[4]/code[2]/text()
uri
----
Removed: /document/body/section[5]/section[4]/p[4]/code[3]/text()
context://lenya
----
Added: /document/body/section[5]/section[4]/p[4]/code[3]/text()
fallback://lenya/
----
Removed: /document/body/section[5]/section[4]/p[4]/text()[7]
directory). The output of the template has to be a Lenya page:
----
Added: /document/body/section[5]/section[4]/p[4]/text()[7]
base URI). The output of the template has to be a Lenya page:
----
Removed: /document/body/section[5]/section[4]/source[2]/text()
<page:page
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
>
<page:title>
<i18n:text><jx:out
value="${usecase.getView().getParameter('title')}"/></i18n:text>
</page:title>
<page:body>
<form>
<input type="hidden" name="lenya.continuation"
value="${continuation.id}"/>
<input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
...
</form>
</page:body>
</page:page>
----
Added: /document/body/section[5]/section[4]/source[2]/text()
<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1" > <page:title>
<i18n:text><jx:out
value="${usecase.getView().getParameter('title')}"/></i18n:text> </page:title>
<page:body> <form> <input type="hidden" name="lenya.continuation"
value="${continuation.id}"/> <input type="hidden" name="lenya.usecase"
value="${usecase.getName()}"/> ... </form> </page:body></page:page>
----
Removed: /document/body/section[5]/section[4]/source[3]/text()
<component-instance ...>
<view uri="cocoon://modules/reports/generateReport.pdf" />
</component-instance>
----
Added: /document/body/section[5]/section[4]/source[3]/text()
<component-instance …> <view
uri="cocoon://modules/reports/generateReport.pdf" /> </component-instance>
----
Removed: /document/body/section[5]/section[5]/ol/li[1]/source/text()
<xconf xpath="/cocoon/gui-manager/[EMAIL PROTECTED] = 'admin']"
unless="/cocoon/gui-manager/[EMAIL PROTECTED] = 'admin']/[EMAIL
PROTECTED] = 'search']">
<tab name="search" label="Search" usecase="admin.search"/>
</xconf>
----
Added: /document/body/section[5]/section[5]/ol/li[1]/source/text()
<xconf xpath="/cocoon/gui-manager/[EMAIL PROTECTED] = 'admin']"
unless="/cocoon/gui-manager/[EMAIL PROTECTED] = 'admin']/[EMAIL PROTECTED] =
'search']"> <tab name="search" label="Search" usecase="admin.search"/>
</xconf>
----
Removed: /document/body/section[5]/section[5]/ol/li[2]/source/text()
<component-instance name="admin.search" logger="lenya.admin"
class="org.apache.lenya.cms.usecase.DummyUsecase">
<view template="usecases/admin/search.jx" menu="true">
<tab group="admin" name="search"/>
</view>
<exit usecase="admin.search"/>
</component-instance>
----
Added: /document/body/section[5]/section[5]/ol/li[2]/source/text()
<component-instance name="admin.search" logger="lenya.admin"
class="org.apache.lenya.cms.usecase.DummyUsecase"> <view
uri="modules/admin/usecases/search.jx" menu="true"> <tab group="admin"
name="search"/> </view> <exit usecase="admin.search"/></component-instance>
----
Removed: /document/body/section[5]/section[6]/source/text()
public String getTargetURL(boolean success) {
String tmpTransfer = getParameterAsString("TRANSFER_FIELD", null);
if (!tmpTransfer.equals("") & tmpTransfer != null)
return tmpTransfer;
else
return super.getTargetURL(success);
}
----
Added: /document/body/section[5]/section[6]/source/text()
public String getTargetURL(boolean success) { String tmpTransfer =
getParameterAsString("TRANSFER_FIELD", null); if (!tmpTransfer.equals("") &
tmpTransfer != null) return tmpTransfer; else return
super.getTargetURL(success);}
----
Removed: /document/body/section[6]/section[1]/ol/li[2]/source/text()
<xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/[EMAIL PROTECTED] =
'mypub/admin.addUser']">
<component-instance name="mypub/admin.addUser"
logger="lenya.usecases.editHeadline"
class="org.myproject.lenya.usecases.AddUser"/>
</xconf>
----
Added: /document/body/section[6]/section[1]/ol/li[2]/source/text()
<xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/[EMAIL PROTECTED] =
'mypub/admin.addUser']"> <component-instance name="mypub/admin.addUser"
logger="lenya.usecases.editHeadline"
class="org.myproject.lenya.usecases.AddUser"/></xconf>
----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]