Package org.opencms.jsp.userdata
Class CmsUserDataResourceHandler
- java.lang.Object
-
- org.opencms.jsp.userdata.CmsUserDataResourceHandler
-
- All Implemented Interfaces:
I_CmsResourceInit
public class CmsUserDataResourceHandler extends java.lang.Object implements I_CmsResourceInit
Impelemnts user data download links for the user data request feature.Download links have the form .../userdatarequest/[id]?auth=[authcode] . If the stored user data request with the given id exists, and its auth code matches the auth code given as a parameter, the download for the user data will be started, otherwise HTTP 404 will be returned.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREFIX
The URL prefix which this handler should handle.-
Fields inherited from interface org.opencms.main.I_CmsResourceInit
ATTR_ALTERNATIVE_CMS_OBJECT
-
-
Constructor Summary
Constructors Constructor Description CmsUserDataResourceHandler()
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.static boolean
isInitialized()
Returns true if an instance has been created.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.main.I_CmsResourceInit
getConfiguration, initParameters
-
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
The URL prefix which this handler should handle.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsUserDataResourceHandler
public CmsUserDataResourceHandler()
Creates a new instance.
-
-
Method Detail
-
isInitialized
public static boolean isInitialized()
Returns true if an instance has been created.- Returns:
- true if an instance has been created
-
initResource
public CmsResource initResource(CmsResource resource, CmsObject cms, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws CmsResourceInitException
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 interfaceI_CmsResourceInit
- Parameters:
resource
- the requested filecms
- the current CmsObjectreq
- the current requestres
- the current response- Returns:
- a resource in the OpenCms VFS
- Throws:
CmsResourceInitException
- if other implementations of the interface should not be executed- See Also:
I_CmsResourceInit.initResource(org.opencms.file.CmsResource, org.opencms.file.CmsObject, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-
-