public abstract class BaseDownloadContentServlet extends BaseServlet
DownloadContentServlet
,
GuestDownloadContentServlet
,
Serialized FormBaseServlet.PathRefInfo
Modifier and Type | Field and Description |
---|---|
protected static String |
ARG_PATH |
protected static String |
ARG_PROPERTY |
protected static String |
MIMETYPE_OCTET_STREAM |
protected static String |
MSG_ERROR_CONTENT_MISSING |
protected static String |
MSG_ERROR_NOT_FOUND |
protected static String |
URL_ATTACH |
protected static String |
URL_ATTACH_LONG |
protected static String |
URL_DIRECT |
protected static String |
URL_DIRECT_LONG |
FACES_SERVLET, KEY_ROOT_PATH, KEY_STORE
Constructor and Description |
---|
BaseDownloadContentServlet() |
Modifier and Type | Method and Description |
---|---|
protected static String |
generateUrl(String pattern,
org.alfresco.service.cmr.repository.NodeRef ref,
String name)
Helper to generate a URL to a content node for downloading content from the server.
|
protected abstract org.apache.commons.logging.Log |
getLogger()
Gets the logger to use for this request.
|
protected void |
processDownloadRequest(HttpServletRequest req,
HttpServletResponse res,
boolean allowLogIn,
boolean transmitContent)
Processes the download request using the current context i.e.
|
checkAccess, getServiceRegistry, redirectToLoginPage, redirectToLoginPage, resolveNamePath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, resolveWebDAVPath, servletAuthenticate, servletAuthenticate, setNoCacheHeaders, validRedirectJSP
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
protected static final String MIMETYPE_OCTET_STREAM
protected static final String MSG_ERROR_CONTENT_MISSING
protected static final String MSG_ERROR_NOT_FOUND
protected static final String URL_DIRECT
protected static final String URL_DIRECT_LONG
protected static final String URL_ATTACH
protected static final String URL_ATTACH_LONG
protected static final String ARG_PROPERTY
protected static final String ARG_PATH
protected abstract org.apache.commons.logging.Log getLogger()
This will show all debug entries from this class as though they came from the subclass.
protected void processDownloadRequest(HttpServletRequest req, HttpServletResponse res, boolean allowLogIn, boolean transmitContent) throws ServletException, IOException
req
- The HTTP requestres
- The HTTP responseallowLogIn
- Indicates whether guest users without access to the content should be redirected to the log in page. If
false
, a status 403 forbidden page is displayed instead.ServletException
IOException
protected static final String generateUrl(String pattern, org.alfresco.service.cmr.repository.NodeRef ref, String name)
pattern
- The pattern to use for the URLref
- NodeRef of the content node to generate URL for (cannot be null)name
- File name to return in the URL (cannot be null)Copyright © 2005–2017 Alfresco Software. All rights reserved.