You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ed...@apache.org on 2003/10/22 16:58:26 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol revisioncontroller.xml rcml.xml version.xml rollback.xml checkout.xml checkin.xml
edith 2003/10/22 07:58:26
Added: src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol
revisioncontroller.xml rcml.xml version.xml
rollback.xml checkout.xml checkin.xml
Log:
Documentation for the RC
Revision Changes Path
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/revisioncontroller.xml
Index: revisioncontroller.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
"document-v11.dtd">
<document>
<header>
<title>Revision Controller</title>
<version />
<type />
<authors>
<person name="Edith Chevrier" email="edith@apache.org" />
</authors>
</header>
<body>
<section>
<title>Introduction</title>
<p>The Revision Controller controls the different reserved
check-in and check-out of documents, the backup versions and the
rollback. It is filesystem oriented</p>
</section>
<section>
<title>Check-in / Check-out</title>
<p>The
<link href="checkin.html">check-in</link>
and
<link href="checkout.html">check-out</link>
are reserved: a checked out document cannot be checked out by
another user.</p>
<p>A user "System" exists, who can force internally a checkin</p>
<p>The different check-in/check-out states (the checkin/out,
the time, the user's identity) of a document are stored in an
xml file with a own markup language: the
<link href="rcml.html">RCML-file.</link></p>
</section>
<section>
<title>Versions</title>
<p>When a document is checked in, the old version of the
document is copied (
<link href="version.html">backup</link>
)</p>
</section>
<section>
<title>Rollback</title>
<p>It is also possible to retrieve an old version with the
<link href="rollback.html">rollback</link>
</p>
</section>
<section>
<title>Package</title>
<source>org.apache.lenya.cms.rc</source>
</section>
</body>
</document>
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/rcml.xml
Index: rcml.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
<header>
<title>Revision Controller Markup Language (RCML)</title>
<version/>
<type/>
<authors>
<person name="Edith Chevrier" email="edith@apache.org"/>
</authors>
</header>
<body>
<section>
<title>Location</title>
<p>The RCML-file are located in a rcml directory</p>
<source>
{publication}/content/rcml/
</source>
<p> which can be configured in </p>
<source>
cocoon-lenya/src/webapp/lenya/config/rc/revision-controller.xconf
</source>
<p>For a document with an xml file {publication}/content/authoring/{filename}, the rcml file is </p>
<source>
{publication}/{rcml-directory}/content/authoring/{filename}.rcml
</source>
</section>
<section>
<title>Markup Language</title>
<p>A rcml-file is typically</p>
<source><![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<XPSRevisionControl>
<CheckIn><Identity>lenya</Identity><Time>1023102128815</Time></CheckIn>
<CheckOut><Identity>lenya</Identity><Time>1023102128780</Time></CheckOut>
<CheckIn><Identity>lenya</Identity><Time>1023102125300</Time></CheckIn>
<CheckOut><Identity>lenya</Identity><Time>1023102121346</Time></CheckOut>
<CheckIn><Identity>roger</Identity><Time>1023102110381</Time></CheckIn>
<CheckOut><Identity>roger</Identity><Time>1023102110349</Time></CheckOut>
<CheckIn><Identity>lenya</Identity><Time>1023102073728</Time></CheckIn>
<CheckOut><Identity>lenya</Identity><Time>1023102012990</Time></CheckOut>
<CheckOut><Identity>lenya</Identity><Time>1023102010354</Time></CheckOut>
<CheckIn><Identity>System</Identity><Time>1022569908000</Time></CheckIn>
</XPSRevisionControl>
]]></source>
</section>
<section>
<title>Size</title>
<p>The size of the rcml file is limited to the value (2 * maximalNumberOfEntries) + 1,
where maximalNumberOfEntries is in org.apache.lenya.cms.rc.RCML hard coded (value 10)</p>
</section>
</body>
</document>
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/version.xml
Index: version.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
<header>
<title>Revision</title>
<version/>
<type/>
<authors>
<person name="Edith Chevrier" email="edith@apache.org"/>
</authors>
</header>
<body>
<section>
<title>Location</title>
<p>The backup files are located in a rcback directory</p>
<source>
{publication}/content/rcbak/
</source>
<p> which can be configured in </p>
<source>
cocoon-lenya/src/webapp/lenya/config/rc/revision-controller.xconf
</source>
<p>For a document with an xml file {publication}/content/authoring/{filename}, the backup files are </p>
<source>
{publication}/{rcback-directory}/content/authoring/{filename}.timestamp
</source>
</section>
<section>
<title>Revision Screen</title>
<p>To get the revision screen, use the serverpage</p>
<source>cocoon-lenya/src/webapp/lenya/content/rc/versions-screen.xsp</source>
<p>Sitemap :</p>
<source><![CDATA[
<map:generate src="content/rc/versions-screen.xsp" type="serverpages"/>
<map:transform src="xslt/rc/rollback.xsl"/>
<map:serialize/>
]]></source>
</section>
<section>
<title>View of an old version</title>
<p>To get the view of a backup version, use the serverpage</p>
<source>cocoon-lenya/src/webapp/lenya/content/rc/view.xsp</source>
<p>It needs the check-in time as request parameter</p>
<p>Sitemap in the publication :</p>
<source><![CDATA[
<map:generate type="serverpages" src="../../content/rc/view.xsp">
</map:generate>
<map:transform src="xslt/toDoc.xsl"/>
<map:transform src="xslt/{../2}2xhtml.xsl"/>
<map:serialize type="xml"/>
]]></source>
</section>
<section>
<title>URL</title>
<p>The call of the URL </p>
<source><![CDATA[{document-URL}?lenya.usecase=rollback&lenya usecase.step=view&rollbackTime={time-point}]]></source>
<p>shows the version corresponding to the time {time-point}</p>
</section>
<section>
<title>Disable the backup </title>
<p>To disable the backup set in the ReservedCheckinAction the backup boolean of getRC().reservedCheckIn(String destination, String identity, boolean backup) to false.</p>
</section>
</body>
</document>
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/rollback.xml
Index: rollback.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
<header>
<title>Rollback</title>
<version/>
<type/>
<authors>
<person name="Edith Chevrier" email="edith@apache.org"/>
</authors>
</header>
<body>
<section>
<title>Revision Controller</title>
<p>To rollback a file call</p>
<source>org.apache.lenya.cms.rc.RevisionController.rollback(String destination, String identity, boolean backupFlag, long time)</source>
<p>where destination is the path of the file from the publication,identity is the identity of the user,
backupFlag is a boolean to choose if you want a backup of the current version, and time is the time of
the version to roll back to.
</p>
</section>
<section>
<title>The RollbackAction</title>
<p>To invoke a rollback from a sitemap pipeline, you use The RollbackAction.</p>
<p>The check-in time is needed as request parameter</p>
<source><![CDATA[
<map:components>
...
<map:actions>
<map:action name="rollback" src="org.apache.lenya.cms.cocoon.acting.RollbackAction"/>
</map:actions>
...
</map:components>
]]></source>
<source><![CDATA[
<map:act type="rollback">
<map:redirect-to session="true" uri="{location}"/>
</map:act>
]]></source>
</section>
<section>
<title>URL</title>
<p>The call of the URL </p>
<source><![CDATA[{document-URL}?lenya.usecase=rollback&lenya usecase.step=rollback&rollbackTime={time-point}]]></source>
<p>invokes the rollbak to the version corresponding to the time {time-point}</p>
</section>
</body>
</document>
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/checkout.xml
Index: checkout.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
<header>
<title>Reserved Checkout</title>
<version/>
<type/>
<authors>
<person name="Edith Chevrier" email="edith@apache.org"/>
</authors>
</header>
<body>
<section>
<title>Revision Controller</title>
<p>To check out a file call the method :</p>
<source>org.apache.lenya.cms.rc.RevisionController.reservedCheckOut(String source, String identity)</source>
<p>where the source is the path of the file from the publication and the identity is the identity of the user.</p>
<p>This method is called from the ReservedCheckoutAction.</p>
</section>
<section>
<title>The ReservedCheckoutAction</title>
<p>To invoke a reserved check out from a sitemap pipeline, you use The ReservedCheckoutAction.</p>
<source><![CDATA[
<map:components>
...
<map:actions>
<map:action name="reserved-checkout" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutAction" logger="sitemap.action.reserved-checkout"/>
</map:actions>
...
</map:components>
]]></source>
<source><![CDATA[
<map:act type="reserved-checkout">
<map:generate src="content/rc/{exception}.xsp" type="serverpages">
<map:parameter name="user" value="{user}"/>
<map:parameter name="filename" value="{filename}"/>
<map:parameter name="date" value="{date}"/>
</map:generate>
<map:transform src="xslt/rc/rco-exception.xsl"/>
<map:serialize/>
</map:act>
]]></source>
</section>
<section>
<title>URL</title>
<p>The call</p>
<source><![CDATA[{document-URL}?lenya.usecase=checkout&lenya usecase.step=checkout]]></source>
<p>invokes a check-out of the document</p>
</section>
<section>
<title>The ReservedCheckoutTestAction</title>
<p>The ReservedCheckoutTestAction checks out a document only if this isn't already checked out</p>
<source><![CDATA[
<map:components>
...
<map:actions>
<map:action name="reserved-checkout-test" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutTestAction" logger="sitemap.action.reserved-checkout-test"/>
</map:actions>
...
</map:components>
]]></source>
<source><![CDATA[
<map:act type="reserved-checkout-test">
<map:generate type="serverpages" src="../../content/rc/{exception}.xsp">
<map:parameter name="user" value="{user}"/>
<map:parameter name="filename" value="{filename}"/>
<map:parameter name="date" value="{date}"/>
</map:generate>
<map:transform src="../../xslt/rc/rco-exception.xsl"/>
<map:serialize/>
</map:act>
]]></source>
</section>
<section>
<title>FileReservedCheckOutException</title>
<p>When the file cannot be checked out because another user has already checked it out,
a fileReservedCheckOutException is thrown:</p>
<source>
File Reserved Checkout Exception
Could not check out the file
Reason : The resource has already been checked out by another user
User: lenya
Date: Wed Oct 22 12:02:28 CEST 2003
Filename: /content/authoring/index/index_de.xml
</source>
<p>The serverpage</p>
<source> cocoon-lenya/src/webapp/lenya/content/rc/fileReservedCheckOutException.xsp</source>
<p>generates the xml which will be transformed with </p>
<source> cocoon-lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl</source>
</section>
<section>
<title>Exception</title>
<p>The errors are catched as generic Exception</p>
<source>
Generic Exception
Check the log files :-)
Filename: /content/authoring/malaVida/index_de.xml </source>
<p>The serverpage</p>
<source> cocoon-lenya/src/webapp/lenya/content/rc/exception.xsp</source>
<p>generates the xml which will be transformed with </p>
<source> cocoon-lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl</source>
</section>
</body>
</document>
1.1 cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/revisioncontrol/checkin.xml
Index: checkin.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
<header>
<title>Reserved Checkin</title>
<version/>
<type/>
<authors>
<person name="Edith Chevrier" email="edith@apache.org"/>
</authors>
</header>
<body>
<section>
<title>Revision Controller</title>
<p>To check in a file call:</p>
<source>org.apache.lenya.cms.rc.RevisionController.reservedCheckIn(String destination, String identity, boolean backup)</source>
<p>where the destination is the path of the file from the publication,
the identity is the identity of the user
and backup is a boolean.</p>
<p>This method is called from the ReservedCheckinAction.</p>
<p>Rem: if no backup (and no rollback is needed) set in the ReservedCheckinAction the backup boolean to false.</p>
</section>
<section>
<title>The ReservedCheckinAction</title>
<p>To invoke a reserved check-in from a sitemap pipeline, you use The ReservedCheckinAction.</p>
<source><![CDATA[
<map:components>
...
<map:actions>
<map:action name="reserved-checkin" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckinAction" logger="sitemap.action.reserved-checkin"/>
</map:actions>
...
</map:components>
]]></source>
<source><![CDATA[
<map:act type="reserved-checkin">
<map:generate src="../../content/rc/{exception}.xsp" type="serverpages">
<map:parameter name="user" value="{user}"/>
<map:parameter name="filename" value="{filename}"/>
<map:parameter name="checkType" value="{checkType}"/>
<map:parameter name="date" value="{date}"/>
</map:generate>
<map:transform src="xslt/rc/rco-exception.xsl"/>
<map:serialize/>
</map:act>
]]></source>
</section>
<section>
<title>URL</title>
<p>The call</p>
<source><![CDATA[{document-URL}?lenya.usecase=checkin&lenya usecase.step=checkin]]></source>
<p>invokes a check-in of the document</p>
</section>
<section>
<title>fileReservedCheckInException</title>
<p>When the file cannot be checked in because another user has already checked it out,
a fileReservedCheckInException is thrown:</p>
<source>
File Reserved Checkin Exception
File not checked in yet
The resource has already been checked out:
User: roger
Date: Wed Oct 22 14:31:05 CEST 2003
Filename: /content/authoring/index/index_de.xml
</source>
<p>The serverpage</p>
<source> cocoon-lenya/src/webapp/lenya/content/rc/fileReservedCheckInException.xsp</source>
<p>generates the xml which will be transformed with </p>
<source> cocoon-lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl</source>
</section>
<section>
<title>Exception</title>
<p>The errors are catched as generic Exception</p>
<source>
Generic Exception
Check the log files :-)
Filename: /content/authoring/malaVida/index_de.xml </source>
<p>The serverpage</p>
<source> cocoon-lenya/src/webapp/lenya/content/rc/exception.xsp</source>
<p>generates the xml which will be transformed with </p>
<source> cocoon-lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl</source>
</section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org