public class CmsDetailPageResourceHandler extends java.lang.Object implements I_CmsResourceInit
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
ATTR_DETAIL_CONTENT_RESOURCE
The attribute containing the detail content resource.
|
构造器和说明 |
---|
CmsDetailPageResourceHandler()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
static CmsUUID |
getDetailId(javax.servlet.ServletRequest req)
Returns the current detail content UUID, 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.
|
protected boolean |
isValidDetailPage(CmsObject cms,
CmsResource page,
CmsResource detailRes)
Checks whether the given detail page is valid for the given resource.
|
public static final java.lang.String ATTR_DETAIL_CONTENT_RESOURCE
public static CmsUUID getDetailId(javax.servlet.ServletRequest req)
null
if this is not a request to a content detail page.req
- the current requestnull
if this is not a request to a content detail pagepublic static CmsResource getDetailResource(javax.servlet.ServletRequest req)
null
if this is not a request to a content detail page.req
- the current requestnull
if this is not a request to a content detail pagepublic CmsResource initResource(CmsResource resource, CmsObject cms, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws CmsResourceInitException, CmsSecurityException
I_CmsResourceInit
Caution: reading parameters from the request, destroys special characters in all parameters, because the encoding for the request was not set yet.
initResource
在接口中 I_CmsResourceInit
resource
- the requested filecms
- the current CmsObjectreq
- the current requestres
- the current responseCmsResourceInitException
- if other implementations of the interface should not be executedCmsSecurityException
- if other implementations of the interface should not be executed,
and the security exception should be escalatedI_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected boolean isValidDetailPage(CmsObject cms, CmsResource page, CmsResource detailRes)
cms
- the CMS contextpage
- the detail pagedetailRes
- the detail resource