public class CmsPermalinkResourceHandler extends java.lang.Object implements I_CmsResourceInit
The permalink must have following format:
/${CONTEXT}/${SERVLET}/permalink/${UUID}.${EXT}
for example:
/opencms/opencms/permalink/a7b5d298-b3ab-11d8-b3e3-514d35713fed.html
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAPTURE_UUID_REGEX
Regex for capturing a UUID.
|
static java.lang.String |
PERMALINK_HANDLER
The permalink handler path.
|
static java.lang.String |
SUFFIX_REGEX
Regex for the optional file extension.
|
Constructor and Description |
---|
CmsPermalinkResourceHandler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final java.lang.String CAPTURE_UUID_REGEX
public static final java.lang.String PERMALINK_HANDLER
public static final java.lang.String SUFFIX_REGEX
public CmsPermalinkResourceHandler()
public CmsResource initResource(CmsResource resource, CmsObject cms, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws CmsResourceInitException, CmsPermissionViolationException
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
in interface I_CmsResourceInit
resource
- the requested filecms
- the current CmsObjectreq
- the current requestres
- the current responseCmsResourceInitException
- if other implementations of the interface should not be executedCmsPermissionViolationException
I_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)