com.atlassian.jira.web.servlet
Class ViewAttachmentServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.atlassian.jira.web.servlet.AbstractViewFileServlet
              extended bycom.atlassian.jira.web.servlet.ViewAttachmentServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
ViewThumbnailServlet

public class ViewAttachmentServlet
extends AbstractViewFileServlet

See Also:
Serialized Form

Constructor Summary
ViewAttachmentServlet()
           
 
Method Summary
protected  Attachment getAttachment(String query)
           
protected  File getFileName(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  boolean hasPermissionToViewAttachment(String userString, Attachment attachment)
           
protected  void setResponseHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class com.atlassian.jira.web.servlet.AbstractViewFileServlet
attachmentPath, doGet, 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

ViewAttachmentServlet

public ViewAttachmentServlet()
Method Detail

getFileName

protected File getFileName(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws org.ofbiz.core.entity.GenericEntityException,
                           EntityNotFoundException,
                           IOException,
                           PermissionException
Specified by:
getFileName in class AbstractViewFileServlet
Throws:
org.ofbiz.core.entity.GenericEntityException
EntityNotFoundException
IOException
PermissionException

getAttachment

protected Attachment getAttachment(String query)
                            throws org.ofbiz.core.entity.GenericEntityException
Parameters:
query - eg. '/10000/foo.txt'
Throws:
org.ofbiz.core.entity.GenericEntityException

setResponseHeaders

protected void setResponseHeaders(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws org.ofbiz.core.entity.GenericEntityException
Specified by:
setResponseHeaders in class AbstractViewFileServlet
Throws:
org.ofbiz.core.entity.GenericEntityException

hasPermissionToViewAttachment

protected boolean hasPermissionToViewAttachment(String userString,
                                                Attachment attachment)
                                         throws EntityNotFoundException,
                                                org.ofbiz.core.entity.GenericEntityException
Throws:
EntityNotFoundException
org.ofbiz.core.entity.GenericEntityException


Copyright © 2002-2006 Atlassian. All Rights Reserved.