| java.lang.Object | |
| ↳ | com.atlassian.plugin.webresource.BatchPluginResource |
Represents a batch of plugin resources.
It provides methods to parse and generate urls to locate a batch of plugin resources. Note BatchPluginResource is also a type ofDownloadableResource. The underlying implementation simply
keeps a list of DownloadableResource of which this batch represents and delegates method calls.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
A constructor that creates a default resource name for the batch in the format: moduleCompleteKey.type
For example: test.plugin:resources.js
Note that name of the batch does not identify what the batch includes and could have been static e.g.
| |||||||||||
A constructor that creates a default resource name for the batch in the format: moduleCompleteKey.type
For example: test.plugin:resources.js
This constructor includes the resources that are contained in the batch, and so is primarily for use
when serving the resource.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the content type for the resource.
| |||||||||||
Returns a url string in the format: /download/batch/MODULE_COMPLETE_KEY/resourceName?PARAMS
e.g.
| |||||||||||
Returns true if the plugin resource has been modified.
| |||||||||||
Writes the resource content out into the response.
| |||||||||||
Write the resource to the supplied OutputStream.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.servlet.DownloadableResource
| |||||||||||
From interface
com.atlassian.plugin.webresource.BatchResource
| |||||||||||
From interface
com.atlassian.plugin.webresource.PluginResource
| |||||||||||
A constructor that creates a default resource name for the batch in the format: moduleCompleteKey.type For example: test.plugin:resources.js
Note that name of the batch does not identify what the batch includes and could have been static e.g. batch.js| moduleCompleteKey | - the key of the plugin module |
|---|---|
| type | - the type of resource (CSS/JS) |
| params | - the parameters of the resource (ieonly, media, etc) |
A constructor that creates a default resource name for the batch in the format: moduleCompleteKey.type For example: test.plugin:resources.js
This constructor includes the resources that are contained in the batch, and so is primarily for use when serving the resource.| moduleCompleteKey | - the key of the plugin module |
|---|---|
| type | - the type of resource (CSS/JS) |
| params | - the parameters of the resource (ieonly, media, etc) |
| resources | - the resources included in the batch. |
Returns the content type for the resource. May return null if it cannot resolve its own content type.
Returns a url string in the format: /download/batch/MODULE_COMPLETE_KEY/resourceName?PARAMS e.g. /download/batch/example.plugin:webresources/example.plugin:webresources.css?ie=true
It is important for the url structure to be: 1. the same number of sectioned paths as the SinglePluginResource 2. include the module completey key in the path before the resource name This is due to css resources referencing other resources such as images in relative path forms.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.
Writes the resource content out into the response.
| DownloadException |
|---|
Write the resource to the supplied OutputStream. Note that the OutputStream will not be closed by this method.
| out | the stream to write to |
|---|
| DownloadException |
|---|