You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Apache Wiki <wi...@apache.org> on 2005/05/14 22:58:58 UTC

[Lenya Wiki] Update of "WyonaRevisionController" by GregorRothfuss

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.

The following page has been changed by GregorRothfuss:
http://wiki.apache.org/lenya/WyonaRevisionController

The comment on the change is:
obsolete

------------------------------------------------------------------------------
- Revision Controller</title> 
+ deleted
  
-    <section><title>What is the Revision Controller?</title> 
-     <p>
- The Revision Controller controls the check-in and check-out of the different documents (reserved check-in/check-out) and manages their different versions.
-     </p>
-     <p>
- An already checked out document cannot be checked out by someone other. An exception is sent, which tells who has already checked out this document and since when.
-     </p>
-     <p>
- When a document is checked-in, the old version of the document can be copied (backup).
-     </p>
-    </section>
-    
-    <section><title>RCML-file</title>
-     <p>
- The different check-in/check-out of a file are memorised in an xml file (RCML-file) created by the class org.apache.lenya.xps.rc.RCML:
-     </p>
- <source><![CDATA[<?xmlversion="1.0"encoding="utf-8"?><XPS!RevisionControl><!CheckIn><Identity>lenya</Identity><Time>1023102128815</Time></!CheckIn><!CheckOut><Identity>lenya</Identity><Time>1023102128780</Time></!CheckOut><!CheckOut><Identity>lenya</Identity><Time>1023102125300</Time></!CheckOut><!CheckOut><Identity>lenya</Identity><Time>1023102121346</Time></!CheckOut><!CheckIn><Identity>lenya</Identity><Time>1023102110381</Time></!CheckIn><!CheckOut><Identity>lenya</Identity><Time>1023102110349</Time></!CheckOut><!CheckIn><Identity>System</Identity><Time>1023102073728</Time></!CheckIn><!CheckOut><Identity>lenya</Identity><Time>1023102073695</Time></!CheckOut><!CheckOut><Identity>lenya</Identity><Time>1023102012990</Time></!CheckOut><!CheckOut><Identity>lenya</Identity><Time>1023102010354</Time></!CheckOut><!CheckIn><Identity>System</Identity><Time>1022569908000</Time></!CheckIn></XPS!RevisionControl>]]></source>
-     <p>
- The RCML-file are located in a preconfigured directory, the RCML-directory. The RCML-file of a specified article with "path" and "filename" is : RCML-directory+path+filename+.rcml  
-     </p>
-    </section>
- 
-    <section><title>Backup</title>
-     <p>
- The backup are located in a preconfigured directory, the BACKUP-directory. The backup of a specified article with "path" and "filename" is : BACKUP-directory+filename+filename+.bak.time 
-     </p>
-    </section>  
-    
-    <section><title>Revision Controller</title>
-      <p>The functionality of the revision controller is managed by the java class org.apache.lenya.cms.rc.!RevisionController:
-      </p>
-      <ul>
-        <li>to check out a file call the method reserved!CheckOut(String source, String identity), where source is the filename of the file and identity, the user. <br/>
- Rem: The same user is allowed to check out repeatedly without having to check back in first.     
-        </li>
-        <li>to check in a file call the method reserved!CheckIn(String destination, String identity, boolean backup), where the destination is the filename of the file, the identity, the user and backup, a boolean to make a backup copy. <br/>
- Rem: <ul>
-       <li>the same user may check in a document repeatedly</li>
-       <li>an already checked out document cannot be checked out by someone other</li>
-       <li>it exists an user "System", who can override evry checkin</li> 
-      </ul> 
-        </li>
-        <li>to roll back to an old version call the method rollback(String destination, String identity, boolean backupFlag, long time), where destination is the filename of the file, the identity is the user, the backupFlag is a boolean to make a backup copy of the current version and the time is the time point of the desired old version.
-        </li>
-      </ul> 
-    </section>
-    <section><title>Revision-Controller Action</title>
-      <p>A specified URL will call an action, which in turn calls the Revision Controller. We defined two different actions, one for the checkin (the reserved-checkin-action) and one for the checkout (the reserved-checkout-action). Both actions inherite from org.apache.lenya.cms.cocoon.acting.!RevisionControllerAction.java
-      </p>
-    </section> 
- </section>
- <section><title>Check Out</title>
-    <section><title>Reserved-Checkout Action</title>
-      <p>
-      The check out of a file can be activated by a specified URL, which call the reserved-checkout action. 
-      </p>
-      <ul>
-        <li>The action to check out a file is the java class java.org.apache.lenya.cms.cocoon.acting.!ReservedCheckoutAction</li>
-        <li>It calls the Revision Controller, the java class org.apache.lenya.cms.rc.!RevisionController and send the different exceptions. See also Exception Handling</li>
-        <li>The configuration of the needed parameters (RCML-directory and the BACKUP-directory) is made in the sitemap. See also Configuration</li>
-        <li>The value of the user is got from the session</li>
-        <li>The reference to the action is made in the authoring-sitemap.xmap. See also Sitemap</li>
-      </ul>
-    </section>
- 
-    <section><title>Sitemap</title>
-      <p>
-       The authoring-sitemap.xmap treated of the check out of document in Authoring.
-      </p>
-      <ul>
-        <li>reference to the action : 
- <code><![CDATA[<map:components>...<map:actions><map:actionname="reserved-checkout"src="org.apache.lenya.cms.cocoon.acting.!ReservedCheckoutAction"logger="sitemap.action.reserved-checkout"></map:action></map:actions>...</map:components>]]></code>
-        </li>
-        <li>call the action for a check out in the pipeline : 
-            <code><![CDATA[<map:matchpattern="rco/*/*/*/*/index.xml"><map:acttype="reserved-checkout"><map:parametername="filename"value="content/live/{1}/{2}/articles/{3}/{4}/index.xml"/><map:generatetype="serverpages"src="../../content/rc/{exception}.xsp"><map:parametername="user"value="{user}"/><map:parametername="filename"value="{filename}"/><map:parametername="date"value="{date}"/></map:generate><map:serializetype="xml"/></map:act><map:generatesrc="content/live/{1}/{2}/articles/{3}/{4}/index.xml"/><map:serializetype="xml"/></map:match>]]></code>
-        </li>                                                                                                                               
-      </ul> 
-    </section>
- 
-    <section><title>Configuration</title>
-      <p>
-      </p>
-      <ul>
-        <li>The configuration of the RCML-directory and the BACKUP-directory is made in the sitemap. The desired parameters are given in the definition of the reerved-checkout-action: 
-            <code><![CDATA[<map:actions><map:actionname="reserved-checkout"src="org.apache.lenya.cms.cocoon.acting.!ReservedCheckoutAction"logger="sitemap.action.reserved-checkout"><rcmlDirectoryhref="content/rcml"/><backupDirectoryhref="content/rcbak"/></map:action></map:actions>]]></code>
- Their values are red by the !ReservedCheckoutAction, who give them to the !RevisionController. 
-        </li>
-      </ul>                                                                                                                                  
-    </section>                                                                                                                                    
- 
-  
- <anchor id="exception"/>
-     <section><title>Exception Handling (XML)</title>
-      <p>
-      </p>
-      <ul>  
-        <li>If the document couldn't be checked in because it was already checked out by someone other or it was already checked in by someone other then the Check-In-Action will send the following XML:
-            <code><![CDATA[<rc:exception><rc:file-reserved-checkin-exception><rc:exception><xsp:expr>exception</xsp:expr></rc:exception><rc:filename><xsp:expr>filename</xsp:expr></rc:filename><rc:checkType><xsp:expr>checkType</xsp:expr></rc:checkType><rc:user><xsp:expr>user</xsp:expr></rc:user><rc:date><xsp:expr>date</xsp:expr></rc:date></rc:file-reserved-checkin-exception></rc:exception>]]></code>
-        </li>
-        <li>If another exception occurs (ex: the file to check in doesn't exist,...) then the Check-In-Action will
- send the following XML:
-            <code><![CDATA[<rc:exception><rc:exception><rc:filename><xsp:expr>filename</xsp:expr></rc:filename></rc:exception></rc:exception>]]></code>
-        </li>
-      </ul>
-    </section>
-    </section>
-    <section><title>Rollback</title>
-      <p> The rollback of a file can be called with a specified URL. The list of the different backup versions will appear on the rollback screen. We can view it or call the rollback to a specified version.</p>
-      <ul>
-       <li>The rollback-screen and the view of the document are generated by serverpages: 
-         <ul>
-          <li>the docs/cms/rc/versions-screen.xsp for the screen</li>
-          <li>and the docs/cms/rc/view.xsp for the view</li>
-         </ul> 
-        </li>
-       <li>The rollback to the an old version si controlled by the rollback action org.apache.lenya.cms.cocoon.acting.!RollbackAction</li>
-      </ul> 
-    <section><title>versions-screen.xsp</title>
-          <p> This serverpage include in the XML document for the screen the rcml document.
-          </p>
-    </section>
-    <section><title>view.xsp</title>
-          <p>
-           This serverpage include in the "View" XML document the XML of desired version
-          </p>
-    </section>
-    <section><title>org.apache.lenya.cms.cocoon.acting.!RollbackAction</title>
-      <p>
-       This action inherite from org.apache.lenya.cms.cocoon.acting.!RevisionController. It called the Revision Controller to execute the rollback
-      </p>
-    </section>
-    <section><title>Sitemap</title>
-      <p>
-        The authoring-sitemap.xmap treated of the rollback of document in Authoring. 
-      </p>
-      <ul>
-        <li>reference to the action for the rollback
- <code><![CDATA[<map:components>...<map:actions>...<map:actionname="rollback"src="org.apache.lenya.cms.cocoon.acting.!RollbackAction"><rcmlDirectoryhref="content/rcml"/><backupDirectoryhref="content/rcbak"/></map:action>...</map:actions>...</map:components>]]></code>
-        </li>
-        <li>call the action for a rollback in the pipeline
- <code><![CDATA[<map:matchpattern="rollback/*/*/*/*/index.xml"><map:acttype="rollback"><map:parametername="filename"value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/><map:redirect-touri="{location}"session="true"/></map:act></map:match>]]></code>
-        </li>
-        <li>generation of the rollback-sreen document
- <code><![CDATA[<map:matchpattern="revision/*/*/*/*/index.xml"><map:generatetype="serverpages"src="../../content/rc/versions-screen.xsp"><map:parametername="rootDir"value="/home/edith/build/jakarta-tomcat-4.0/webapps/lenya/lenya/pubs/unipublic"/><map:parametername="filename"value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/><map:parametername="rcmlDirectory"value="content/rcml"/><map:parametername="backupDirectory"value="content/rcbak"/><map:parametername="channel"value="{1}"/><map:parametername="section"value="{2}"/><map:parametername="year"value="{3}"/><map:parametername="articleId"value="{4}"/></map:generate><map:transformsrc="../../xslt/rc/rollback.xsl"/><map:serializetype="html"/></map:match>]]></code>
-        </li>
-        <li>generation of the view document
- <code><![CDATA[<map:matchpattern="view/*/*/*/*/index.xml"><map:generatetype="serverpages"src="../../content/rc/view.xsp"><map:parametername="rootDir"value="/home/edith/build/jakarta-tomcat-4.0/webapps/lenya/lenya/pubs/unipublic"/><map:parametername="filename"value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/><map:parametername="rcmlDirectory"value="content/rcml"/><map:parametername="backupDirectory"value="content/rcbak"/></map:generate><map:transformsrc="xslt/article/authoring/toArticle.xsl"/><map:transformsrc="xslt/article/authoring/main.xsl"><map:paramete]]><![CDATA[rname="section"value="{2}"/></map:transform><map:serializetype="html"/></map:match>]]></code></li>
-      </ul>
-    </section>
-    <section><title>Configuration</title>
-      <p>
-       The configuration of the RCML-directory and the BACKUP-directory are made in the sitemap. The desired parameters are given in the definition of the rollback-action and in the call of the serverpages: look above
-      </p>                                                                                                                                     
-    </section>                                                                                                                                      
-    </section>     
- 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org