com.atlassian.plugin.servlet
Class BaseFileServerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.plugin.servlet.BaseFileServerServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class BaseFileServerServlet
extends javax.servlet.http.HttpServlet

See Also:
Serialized Form

Field Summary
static java.lang.String PATH_SEPARATOR
           
static java.lang.String RESOURCE_URL_PREFIX
           
static java.lang.String SERVLET_PATH
           
 
Constructor Summary
BaseFileServerServlet()
           
 
Method Summary
protected  void addDownloadStrategy(java.lang.Class strategyClass)
           
protected  void doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
           
protected abstract  java.lang.String getContentType(java.lang.String location)
           
abstract  java.lang.String getDecodedPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
           
 java.lang.String getMimeType(java.io.File fileToServe)
           
 void init()
           
 void init(javax.servlet.ServletConfig servletConfig)
           
protected abstract  DownloadStrategy instantiateDownloadStrategy(java.lang.Class downloadStrategyClass)
           
 void serveFileImpl(javax.servlet.http.HttpServletResponse httpServletResponse, java.io.InputStream in)
          Deprecated. Use ResourceDownloadUtils.serveFileImpl(javax.servlet.http.HttpServletResponse, java.io.InputStream) instead
protected abstract  java.lang.String urlDecode(java.lang.String url)
           
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_SEPARATOR

public static final java.lang.String PATH_SEPARATOR
See Also:
Constant Field Values

RESOURCE_URL_PREFIX

public static final java.lang.String RESOURCE_URL_PREFIX
See Also:
Constant Field Values

SERVLET_PATH

public static java.lang.String SERVLET_PATH
Constructor Detail

BaseFileServerServlet

public BaseFileServerServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getMimeType

public java.lang.String getMimeType(java.io.File fileToServe)

serveFileImpl

public void serveFileImpl(javax.servlet.http.HttpServletResponse httpServletResponse,
                          java.io.InputStream in)
                   throws java.io.IOException
Deprecated. Use ResourceDownloadUtils.serveFileImpl(javax.servlet.http.HttpServletResponse, java.io.InputStream) instead

Throws:
java.io.IOException

getDecodedPathInfo

public abstract java.lang.String getDecodedPathInfo(javax.servlet.http.HttpServletRequest httpServletRequest)

instantiateDownloadStrategy

protected abstract DownloadStrategy instantiateDownloadStrategy(java.lang.Class downloadStrategyClass)

urlDecode

protected abstract java.lang.String urlDecode(java.lang.String url)

getContentType

protected abstract java.lang.String getContentType(java.lang.String location)

doGet

protected void doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
                     javax.servlet.http.HttpServletResponse httpServletResponse)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

addDownloadStrategy

protected void addDownloadStrategy(java.lang.Class strategyClass)


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.