Class AbstractDownloadStrategy

    • Method Detail

      • matches

        public boolean matches​(String requestUri)
        Specified by:
        matches in interface com.atlassian.plugin.servlet.DownloadStrategy
      • getServletPath

        protected abstract String getServletPath()
        Returns the servlet path handled by this download strategy. Includes the leading "/" but no trailing "/", eg. "/download" or "/artifact".
      • serveFile

        public void serveFile​(javax.servlet.http.HttpServletRequest httpServletRequest,
                              javax.servlet.http.HttpServletResponse httpServletResponse)
                       throws com.atlassian.plugin.servlet.DownloadException
        Specified by:
        serveFile in interface com.atlassian.plugin.servlet.DownloadStrategy
        Throws:
        com.atlassian.plugin.servlet.DownloadException
      • throwPermissionException

        protected void throwPermissionException​(RequestPath requestPath)
                                         throws UserNotLoggedInException,
                                                org.acegisecurity.AccessDeniedException
        Throws an exception indicating that the current user does not have permission to access the requested item. The requestPath parameter may be included in the exception message and/or logs.
        Throws:
        UserNotLoggedInException
        org.acegisecurity.AccessDeniedException
      • isCompressionEnabled

        protected boolean isCompressionEnabled()