apache > lenya
 

Rollback

Revision Controller

To rollback a file call

org.apache.lenya.cms.rc.RevisionController.rollback(String destination, String identity, boolean backupFlag, long time)

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.

The RollbackAction

To invoke a rollback from a sitemap pipeline, you use The RollbackAction.

The check-in time is needed as request parameter


      <map:components>
        ...
        <map:actions>
  	      <map:action name="rollback" src="org.apache.lenya.cms.cocoon.acting.RollbackAction"/>
        </map:actions>
        ...
      </map:components>

      
            <map:act type="rollback">
              <map:redirect-to session="true" uri="{location}"/>
            </map:act>
      

URL

The call of the URL

{document-URL}?lenya.usecase=rollback&lenya usecase.step=rollback&rollbackTime={time-point}

invokes the rollbak to the version corresponding to the time {time-point}