info.magnolia.dam
Class DamDownloadServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
info.magnolia.dam.DamDownloadServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class DamDownloadServlet
- extends javax.servlet.http.HttpServlet
Servlet to handle dam document downloads.
- See Also:
- Serialized Form
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected boolean |
isValidPath(String path)
|
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The main task is to retrieve an Asset Object based on the
current Uri. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DamDownloadServlet
public DamDownloadServlet()
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
process
public void process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
- The main task is to retrieve an Asset Object based on the
current Uri. Basically, if no Asset could be found based on the current
Uri, send an error to the response.
If an Asset is found, set the response header and put the Asset Binary in
the response.
- Throws:
Exception
isValidPath
protected boolean isValidPath(String path)
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.