public abstract class

AbstractTransformedDownloadableResource

extends Object
implements DownloadableResource
java.lang.Object
   ↳ com.atlassian.plugin.webresource.transformer.AbstractTransformedDownloadableResource
Known Direct Subclasses

Class Overview

Abstract class for implementing downloadable resources that are wrapping an underlying resource as part of a WebResourceTransformer implementation. Subclasses are expected to implement streamResource(OutputStream), while the other methods are delegated by default.

Summary

Public Constructors
AbstractTransformedDownloadableResource(DownloadableResource originalResource)
Public Methods
String getContentType()
Returns the content type for the resource.
boolean isResourceModified(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
Returns true if the plugin resource has been modified.
void serveResource(HttpServletRequest httpServletRequest, HttpServletResponse response)
Writes the resource content out into the response.
Protected Methods
DownloadableResource getOriginalResource()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.servlet.DownloadableResource

Public Constructors

public AbstractTransformedDownloadableResource (DownloadableResource originalResource)

Public Methods

public String getContentType ()

Returns the content type for the resource. May return null if it cannot resolve its own content type.

public boolean isResourceModified (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)

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 been modified, the resource shouldn't be served.

public void serveResource (HttpServletRequest httpServletRequest, HttpServletResponse response)

Writes the resource content out into the response.

Protected Methods

protected DownloadableResource getOriginalResource ()