|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.request.resource.ResourceReference
org.apache.wicket.request.resource.ContextRelativeResourceReference
public class ContextRelativeResourceReference
This is a ResourceReference to handle context-relative resources such as js, css and
picture files placed in a folder on the context root (ex: '/css/coolTheme.css').
The class has a flag (see isMinifyIt()) to decide if referenced resource can be
minified (ex: '/css/coolTheme.min.css') or not.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference |
|---|
ResourceReference.Key, ResourceReference.UrlAttributes |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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). |
| Methods inherited from class org.apache.wicket.request.resource.ResourceReference |
|---|
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContextRelativeResourceReference(String name)
name - the resource name
public 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 not
public ContextRelativeResourceReference(String name,
String minPostfix)
name - the resource nameminPostfix - the minfied postfix
public 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 not| Method Detail |
|---|
protected 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
org.apache.wicket.settings.ResourceSettings#getUseMinifiedResources()}
are true.
true if resource can be minified, false otherwisepublic final ContextRelativeResource getResource()
ResourceReference
getResource in class ResourceReferencepublic boolean isMinifyIt()
public String getMinPostfix()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||