| 
 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.file.history.CmsHistoryResourceHandler
public class CmsHistoryResourceHandler
Resource init handler that loads historical versions of resources.
| Field Summary | |
|---|---|
| static java.lang.String | ATTRIBUTE_NAMEConstant for the historical version request attribute name. | 
| static java.lang.String | HISTORY_HANDLERThe historical version handler path. | 
| static java.lang.String | PARAM_VERSIONRequest parameter name for the version number. | 
| static int | PROJECT_OFFLINE_VERSIONConstant for the offline project version. | 
| Constructor Summary | |
|---|---|
| CmsHistoryResourceHandler() | |
| Method Summary | |
|---|---|
| static I_CmsHistoryResource | getHistoryResource(javax.servlet.ServletRequest req)Returns the historical version of a resource, if the given request is displaying a history version. | 
|  CmsResource | initResource(CmsResource resource,
             CmsObject cms,
             javax.servlet.http.HttpServletRequest req,
             javax.servlet.http.HttpServletResponse res)Possibility to modify or change the CmsFile with the CmsObject. | 
| static boolean | isHistoryRequest(javax.servlet.ServletRequest req)Returns trueif the given request is displaying an historical version. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String ATTRIBUTE_NAME
public static final java.lang.String HISTORY_HANDLER
public static final java.lang.String PARAM_VERSION
public static final int PROJECT_OFFLINE_VERSION
| Constructor Detail | 
|---|
public CmsHistoryResourceHandler()
| Method Detail | 
|---|
public static I_CmsHistoryResource getHistoryResource(javax.servlet.ServletRequest req)
req - the request to check
public static boolean isHistoryRequest(javax.servlet.ServletRequest req)
true if the given request is displaying an historical version.
req - the request to check
true if the given request is displaying a historical version
public CmsResource initResource(CmsResource resource,
                                CmsObject cms,
                                javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws CmsResourceInitException
I_CmsResourceInitCaution: reading parameters from the request, destroys special characters in all parameters, because the encoding for the request was not set yet.
initResource in interface I_CmsResourceInitresource - the requested filecms - the current CmsObjectreq - the current requestres - the current response
CmsResourceInitException - if other implementations of the interface should not be executedI_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)| 
 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||