Class ForwardableResource

java.lang.Object
com.atlassian.plugin.servlet.ForwardableResource
All Implemented Interfaces:
DownloadableResource

public class ForwardableResource extends Object implements DownloadableResource
A DownloadableResource that simply forwards the request to the given location. This should be used to reference dynamic resources available in the web application e.g dwr js files
  • Constructor Details

    • ForwardableResource

      public ForwardableResource(com.atlassian.plugin.elements.ResourceLocation resourceLocation)
  • Method Details

    • isResourceModified

      public boolean isResourceModified(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: DownloadableResource
      Returns true if the plugin resource has been modified. The implementing class is responsible for setting any appropriate response codes or headers on the response. If the resource has not been modified, the resource shouldn't be served.
      Specified by:
      isResourceModified in interface DownloadableResource
    • serveResource

      public void serveResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws DownloadException
      Description copied from interface: DownloadableResource
      Writes the resource content out into the response.
      Specified by:
      serveResource in interface DownloadableResource
      Throws:
      DownloadException - if there were errors writing to the response.
    • streamResource

      public void streamResource(OutputStream out)
      Not implemented by a ForwardableResource. The supplied OutputStream will not be modified.
      Specified by:
      streamResource in interface DownloadableResource
      Parameters:
      out - the stream to write to
    • getContentType

      public String getContentType()
      Description copied from interface: DownloadableResource
      Returns the content type for the resource. May return null if it cannot resolve its own content type.
      Specified by:
      getContentType in interface DownloadableResource
    • getLocation

      protected String getLocation()
    • toString

      public String toString()
      Overrides:
      toString in class Object