| 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.
| |||||||||||
| 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.
| |||||||||||
Parses the given url and query parameter map into a BatchPluginResource.
| |||||||||||
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.jsReturns 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.
Parses the given url and query parameter map into a BatchPluginResource. Query paramters must be passed in through the map, any in the url String will be ignored.
| url | the url to parse |
|---|---|
| queryParams | a map of String key and value pairs representing the query parameters in the url |
| UrlParseException | if the url passed in is not a valid batch resource url |
|---|
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 |
|---|