com.atlassian.jira.web.servlet
Class ViewThumbnailServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.jira.web.servlet.AbstractViewFileServlet
              extended by com.atlassian.jira.web.servlet.ViewAttachmentServlet
                  extended by com.atlassian.jira.web.servlet.ViewThumbnailServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ViewThumbnailServlet
extends ViewAttachmentServlet

See Also:
Serialized Form

Constructor Summary
ViewThumbnailServlet()
           
 
Method Summary
protected  void getInputStream(String attachmentPath, InputStreamConsumer<Void> consumer)
          Returns the file of the attachment.
protected  void setResponseHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Sets the content type, content length and "Content-Disposition" header of the response based on the values of the attachement found.
 
Methods inherited from class com.atlassian.jira.web.servlet.ViewAttachmentServlet
getAttachment, hasPermissionToViewAttachment
 
Methods inherited from class com.atlassian.jira.web.servlet.AbstractViewFileServlet
attachmentQuery, doGet, getJiraAuthenticationContext, getUserName
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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
 

Constructor Detail

ViewThumbnailServlet

public ViewThumbnailServlet()
Method Detail

getInputStream

protected void getInputStream(String attachmentPath,
                              InputStreamConsumer<Void> consumer)
                       throws InvalidAttachmentPathException,
                              DataAccessException,
                              IOException,
                              PermissionException
Description copied from class: ViewAttachmentServlet
Returns the file of the attachment.

Overrides:
getInputStream in class ViewAttachmentServlet
Parameters:
attachmentPath - the query describing which attachment to get
Throws:
InvalidAttachmentPathException - if the path to the attachment was invalid in some way.
DataAccessException - if attachment or user cannot be retrieved due to some kind of db access problem.
IOException - if there is a problem getting the File.
PermissionException - if user is denied permission to see the attachment

setResponseHeaders

protected void setResponseHeaders(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
Description copied from class: ViewAttachmentServlet
Sets the content type, content length and "Content-Disposition" header of the response based on the values of the attachement found.

Overrides:
setResponseHeaders in class ViewAttachmentServlet
Parameters:
request - HTTP request
response - HTTP response


Copyright © 2002-2014 Atlassian. All Rights Reserved.