org.opencms.file
Class CmsBackupResourceHandler

java.lang.Object
  extended by org.opencms.file.CmsBackupResourceHandler
All Implemented Interfaces:
I_CmsResourceInit

public class CmsBackupResourceHandler
extends Object
implements I_CmsResourceInit

Resource init handler that loads backup versions of resources.

Since:
6.0.1
Version:
$Revision: 1.2 $
Author:
Michael Emmerich

Field Summary
static String ATTRIBUTE_NAME
          Constant for the backup request attribute name.
static String BACKUP_HANDLER
          The backup handler path.
static String PARAM_VERSIONID
          Request parameter name for the version id.
 
Constructor Summary
CmsBackupResourceHandler()
           
 
Method Summary
 CmsResource initResource(CmsResource resource, CmsObject cms, HttpServletRequest req, HttpServletResponse res)
          Possibility to modify or change the CmsFile with the CmsObject.
static boolean isBackupRequest(ServletRequest req)
          Returns true if the given request is displaying a history backup version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NAME

public static final String ATTRIBUTE_NAME
Constant for the backup request attribute name.

See Also:
Constant Field Values

BACKUP_HANDLER

public static final String BACKUP_HANDLER
The backup handler path.

See Also:
Constant Field Values

PARAM_VERSIONID

public static final String PARAM_VERSIONID
Request parameter name for the version id.

See Also:
Constant Field Values
Constructor Detail

CmsBackupResourceHandler

public CmsBackupResourceHandler()
Method Detail

isBackupRequest

public static boolean isBackupRequest(ServletRequest req)
Returns true if the given request is displaying a history backup version.

Parameters:
req - the request to check
Returns:
true if the given request is displaying a history backup version

initResource

public CmsResource initResource(CmsResource resource,
                                CmsObject cms,
                                HttpServletRequest req,
                                HttpServletResponse res)
Description copied from interface: I_CmsResourceInit
Possibility to modify or change the CmsFile with the CmsObject.

Specified by:
initResource in interface I_CmsResourceInit
Parameters:
resource - the requested file
cms - the current CmsObject
req - the current request
res - the current response
Returns:
a resource in the OpenCms VFS
See Also:
I_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)