public interface

WebResourceTransformer

com.atlassian.plugin.webresource.transformer.WebResourceTransformer

Class Overview

Transforms a downloadable resource. Instances are created per request, though it is assumed the resource will have the appropriate caching headers to ensure the same user doesn't download it twice.

Summary

Public Methods
abstract DownloadableResource transform(Element configElement, ResourceLocation location, String filePath, DownloadableResource nextResource)
Transforms the downloadable resource by returning a new one.

Public Methods

public abstract DownloadableResource transform (Element configElement, ResourceLocation location, String filePath, DownloadableResource nextResource)

Transforms the downloadable resource by returning a new one.

Parameters
configElement The element where it was used. This is provided to allow the transformer to take additional configuration in the form of custom attributes or sub-elements.
location The original resource location
filePath Extra path information. Cannot be null, but can be an empty string if no extra path information
nextResource The original resource
Returns
  • The new resource representing the transformed resource