public class JavascriptWebResource extends Object
| Modifier and Type | Field and Description |
|---|---|
static WebResourceFormatter |
FORMATTER |
webResourceFormatters| Constructor and Description |
|---|
JavascriptWebResource() |
| Modifier and Type | Method and Description |
|---|---|
String |
formatResource(String url,
Map<String,String> attributes)
Returns a formatted resource string.
|
String |
formatResource(String url,
Map<String,String> attributes,
boolean enableDeferJsAttribute) |
protected List<String> |
getAttributeParameters()
Should return a List of parameter name
Strings, which the WebResourceFormatter will write out as
HTML attributes. |
protected List<String> |
getParametersAsAttributes(Map params)
A convenient method to convert the given parameter map into a List of HTML
String attributes. |
boolean |
matches(String name)
Returns true if this filter supports the inclusion of the given resource.
|
public static final WebResourceFormatter FORMATTER
public boolean matches(String name)
WebResourceFiltername - name of the resourcepublic String formatResource(String url, Map<String,String> attributes)
WebResourceFormatterpublic String formatResource(String url, Map<String,String> attributes, boolean enableDeferJsAttribute)
protected List<String> getAttributeParameters()
Strings, which the WebResourceFormatter will write out as
HTML attributes.List of parameter namesprotected List<String> getParametersAsAttributes(Map params)
String attributes.
For example, an entry with key 'foo' and value 'bar' is converted to the attribute string, foo="bar".
Only parameters that are supported by the WebResourceFormatter are formatted (See getAttributeParameters()).
Copyright © 2017 Atlassian. All rights reserved.