Package com.atlassian.plugin.servlet
Class ForwardableResource
java.lang.Object
com.atlassian.plugin.servlet.ForwardableResource
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionForwardableResource(com.atlassian.plugin.elements.ResourceLocation resourceLocation) -
Method Summary
Modifier and TypeMethodDescriptionReturns the content type for the resource.protected StringbooleanisResourceModified(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Returns true if the plugin resource has been modified.voidserveResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Writes the resource content out into the response.voidNot implemented by aForwardableResource.toString()
-
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:DownloadableResourceReturns 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:
isResourceModifiedin interfaceDownloadableResource
-
serveResource
public void serveResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws DownloadException Description copied from interface:DownloadableResourceWrites the resource content out into the response.- Specified by:
serveResourcein interfaceDownloadableResource- Throws:
DownloadException- if there were errors writing to the response.
-
streamResource
Not implemented by aForwardableResource. The supplied OutputStream will not be modified.- Specified by:
streamResourcein interfaceDownloadableResource- Parameters:
out- the stream to write to
-
getContentType
Description copied from interface:DownloadableResourceReturns the content type for the resource. May return null if it cannot resolve its own content type.- Specified by:
getContentTypein interfaceDownloadableResource
-
getLocation
-
toString
-