org.opencms.ade.detailpage
Class CmsDetailPageResourceHandler

java.lang.Object
  extended by org.opencms.ade.detailpage.CmsDetailPageResourceHandler
All Implemented Interfaces:
I_CmsResourceInit

public class CmsDetailPageResourceHandler
extends Object
implements I_CmsResourceInit

Resource init handler for detail-pages.

Since:
8.0.0

Field Summary
static String ATTR_DETAIL_CONTENT_RESOURCE
          The attribute containing the detail content resource.
 
Constructor Summary
CmsDetailPageResourceHandler()
          Default constructor.
 
Method Summary
static CmsUUID getDetailId(javax.servlet.ServletRequest req)
          Returns the current detail content UID, or null if this is not a request to a content detail page.
static CmsResource getDetailResource(javax.servlet.ServletRequest req)
          Returns the current detail content resource, or null if this is not a request to a content detail page.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_DETAIL_CONTENT_RESOURCE

public static final String ATTR_DETAIL_CONTENT_RESOURCE
The attribute containing the detail content resource.

See Also:
Constant Field Values
Constructor Detail

CmsDetailPageResourceHandler

public CmsDetailPageResourceHandler()
Default constructor.

Method Detail

getDetailId

public static CmsUUID getDetailId(javax.servlet.ServletRequest req)
Returns the current detail content UID, or null if this is not a request to a content detail page.

Parameters:
req - the current request
Returns:
the current detail content UID, or null if this is not a request to a content detail page

getDetailResource

public static CmsResource getDetailResource(javax.servlet.ServletRequest req)
Returns the current detail content resource, or null if this is not a request to a content detail page.

Parameters:
req - the current request
Returns:
the current detail content resource, or null if this is not a request to a content detail page

initResource

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

Caution: reading parameters from the request, destroys special characters in all parameters, because the encoding for the request was not set yet.

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
Throws:
CmsResourceInitException - if other implementations of the interface should not be executed
CmsSecurityException - if other implementations of the interface should not be executed, and the security exception should be escalated
See Also:
I_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)