public class ContextRelativeResourceReference extends ResourceReference
isMinifyIt()) to decide if referenced resource can be
minified (ex: '/css/coolTheme.min.css') or not.ResourceReference.Key, ResourceReference.UrlAttributes| Constructor and Description |
|---|
ContextRelativeResourceReference(String name)
Instantiates a new context relative resource reference for the given name.
|
ContextRelativeResourceReference(String name,
boolean minifyIt)
Instantiates a new context relative resource reference for the given name.
|
ContextRelativeResourceReference(String name,
String minPostfix)
Instantiates a new context relative resource reference for the given name.
|
ContextRelativeResourceReference(String name,
String minPostfix,
boolean minifyIt)
Instantiates a new context relative resource reference for the given name.
|
| Modifier and Type | Method and Description |
|---|---|
protected ContextRelativeResource |
buildContextRelativeResource(String name,
String minPostfix)
Build the context-relative resource for this resource reference.
|
protected boolean |
canBeMinified()
Says if the referenced resource can be minified.
|
String |
getMinPostfix()
Gets the minified postfix we use for this resource.
|
ContextRelativeResource |
getResource()
Returns the resource.
|
boolean |
isMinifyIt()
Returns the flag that says if the resource can be minified (true) or not (false).
|
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, toStringpublic ContextRelativeResourceReference(String name)
name - the resource namepublic ContextRelativeResourceReference(String name, boolean minifyIt)
minifyIt says if the resource can be minified (true) or not (false).name - the resource nameminifyIt - says if the resource name can be minified or notpublic ContextRelativeResourceReference(String name, String minPostfix)
name - the resource nameminPostfix - the minfied postfixpublic ContextRelativeResourceReference(String name, String minPostfix, boolean minifyIt)
minifyIt says if the resource can be minified (true) or not (false).name - the resource nameminPostfix - the minfied postfixminifyIt - says if the resource name can be minified or notprotected ContextRelativeResource buildContextRelativeResource(String name, String minPostfix)
name - the resource nameminPostfix - the postfix to use to minify the resource name (typically "min")protected boolean canBeMinified()
true if
both flag minifyIt and application's resource settings method
ResourceSettings.getUseMinifiedResources()}
are true.true if resource can be minified, false otherwisepublic final ContextRelativeResource getResource()
ResourceReferencegetResource in class ResourceReferencepublic boolean isMinifyIt()
public String getMinPostfix()
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.