Class ResourceDownloadUtils

java.lang.Object
com.atlassian.plugin.servlet.ResourceDownloadUtils

public class ResourceDownloadUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String... cacheControls)
    Set 'expire' headers to cache for one year.
    static void
    addPrivateCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse)
    Sets caching headers with private cache control.
    static void
    addPublicCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse)
    Sets caching headers with public cache control.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourceDownloadUtils

      public ResourceDownloadUtils()
  • Method Details

    • addCachingHeaders

      public static void addCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String... cacheControls)
      Set 'expire' headers to cache for one year. Also adds the additional cache control values passed in. Note, this method resets the cache control headers if set previously. If caches are disabled (via the system property atlassian.disable.caches), this method sets 'expires' to 0.
    • addPublicCachingHeaders

      public static void addPublicCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse)
      Sets caching headers with public cache control. Applications should call this method from urlrewrite.xml to decorate urls like /s/{build num}/.../_/resourceurl.
      See Also:
    • addPrivateCachingHeaders

      public static void addPrivateCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse)
      Sets caching headers with private cache control. Applications should call this method from urlrewrite.xml to decorate urls like /sp/{build num}/.../_/resourceurl.
      See Also: