| java.lang.Object | ||
| ↳ | com.atlassian.plugin.webresource.transformer.AbstractTransformedDownloadableResource | |
| ↳ | com.atlassian.plugin.webresource.transformer.AbstractStringTransformedDownloadableResource | |
This class is deprecated.
since 2.9.0 use CharSequenceDownloadableResource instead
Abstract class that makes it easy to create transforms that go from string to string. Override
getEncoding() to customize the character encoding of the underlying content and transformed content.
For example, here is a minimal transformer that prepends text to the underlying resource:
public class PrefixTransformer implements WebResourceTransformer
{
public DownloadableResource transform(Element configElement, ResourceLocation location, String filePath, DownloadableResource nextResource)
{
return new AbstractStringTransformedDownloadableResource(nextResource)
{
protected String transform(String originalContent)
{
return "Prefix: " + originalContent;
}
};
}
}
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Override this method to transform the original content into a new format.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.plugin.webresource.transformer.AbstractTransformedDownloadableResource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.servlet.DownloadableResource
| |||||||||||
Override this method to transform the original content into a new format.
| originalContent | The original content from the original downloadable resource. |
|---|