Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.0
  • Version 1.2
  • Version 1.2
    • Installation
      • Download
      • Subversion Access
      • Install Instructions
    • Tutorial
      • Introduction
      • 1. Understanding Lenya
      • 2. Installing Lenya
      • 3. Anatomy of the Pipeline
      • 4. Editing in Lenya
      • 5. Custom Navigation in Lenya
      • 6a. Mod Proxy and Lenya
      • 6b. Mod Proxy and Lenya
    • How-To
      • FAQ
      • New Publication
      • Deploy Publication
      • Look and Feel
      • Custom Resource Type
      • Adding Mime Types
      • Site Navigation
      • LDAP Authentication
      • CMS Menus
      • CMS Screens
      • Search Publications
      • External Data
      • Unit Tests
    • Components
      • Access Control
        • Basic Terms
        • Access Controllers
        • Access Controller Resolvers
        • Authenticators
        • Authorizers
        • Policies and Policy Managers
        • Accreditable Managers
        • SSL Encryption
      • Authoring
        • Adding a new document creator
        • Image Upload
        • OpenOffice
      • Deployment
        • Proxying
      • Editors
        • HTML Form Editor
        • HTML One Form Editor
        • Bitflux Editor
        • Kupu
        • Xopus
      • Layout
        • Navigation
        • XHTML templating
        • Serving static resources
        • Lenya Menubar
      • Publication
        • PageEnvelopeModule
        • Site tree
      • Resource Types
        • Resource Types
      • Revision Control
        • Revision Controller
        • RCML
        • Check In
        • Check Out
        • Revisions
        • Rollback
      • Repository
        • WebDAV Servers
      • Search
        • Searching with Lucene
      • URI Handling
        • URI Parametrizer
        • URI Scheme
        • Usecases
      • Asset Management
        • Asset Management
      • Link Management
        • Link Management
      • Meta Data
        • Meta Data Handling
      • Multilingual Documents
        • Multilingual Document Handling
      • Tasks
        • The Task Concept
        • Defining Tasks
        • The TaskAction
        • Scheduling a Task
        • Included tasks
          • AntTask
          • DefaultFilePublisher
          • StaticHTMLExporter
          • MailTask
        • Developing Tasks
      • Workflow
        • Terms
        • The State Machine
        • Configuration
        • Implementation
      • Site Management
        • Archive
        • Copy
        • Deactivate
        • Delete
        • Delete the trash
        • Move
        • Move Up/Down
        • Rename
        • Restore
    • Miscellaneous
      • Namespaces
      • Reserved Names
      • XInclude Processor
    • 1.2 API (Javadoc)

Current Event

Built with Apache Lenya

Reserved Checkin

Table of Contents
  • Revision Controller
  • The ReservedCheckinAction
  • URL
  • fileReservedCheckInException
  • Exception

Revision Controller

To check in a file call:

org.apache.lenya.cms.rc.RevisionController.reservedCheckIn(
    String destination, String identity, boolean backup)

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.

This method is called from the ReservedCheckinAction.

Rem: if no backup (and no rollback is needed) set in the ReservedCheckinAction the backup boolean to false.

The ReservedCheckinAction

To invoke a reserved check-in from a sitemap pipeline, you use The ReservedCheckinAction.

      <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>
      
            <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>
      

URL

The call

{document-URL}?lenya.usecase=checkin&lenya.step=checkin

invokes a check-in of the document

fileReservedCheckInException

When the file cannot be checked in because another user has already checked it out, a fileReservedCheckInException is thrown:

	  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
	  

The serverpage

lenya/src/webapp/lenya/content/rc/fileReservedCheckInException.xsp

generates the xml which will be transformed with

lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl

Exception

The errors are catched as generic Exception

      Generic Exception

      Check the log files :-)
      Filename:	/content/authoring/malaVida/index_de.xml	  

The serverpage

 lenya/src/webapp/lenya/content/rc/exception.xsp

generates the xml which will be transformed with

 lenya/src/webapp/lenya/xslt/rc/rco-exception.xsl

Copyright © 1999-2011 The Apache Software Foundation. All rights reserved.

Apache Lenya, Apache, and the Apache feather logo are trademarks of The Apache Software Foundation.