Class MetaInfStaticResourceReference
java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.apache.wicket.request.resource.PackageResourceReference
org.apache.wicket.request.resource.MetaInfStaticResourceReference
- All Implemented Interfaces:
Serializable
,IClusterable
Resource reference for static files. The resource must reside under the "/META-INF/resources/"
directory. So if you have a foo.bar.Component and want to have a static icon.gif belonging to it
the image must be available on the "META-INF/resources/foo/bar/icon.gif" classpath inside a jar
file.
If run under a Servlet 3.0 environment "foo/bar/icon.gif" like resource urls will be made and
served by the servlet container instead of wicket (which is faster).
If run under a non Servlet 3.0 environment (like 2.5) resources will be served by wicket (urls
will look like "wicket/resource/foo/bar/icon.gif").
- Author:
- akiraly
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
mapHandler
(IRequestHandler requestHandler) Returns theUrl
for givenIRequestHandler
if "/META-INF/resources" Servlet 3.0 feature is supported ornull
if not (so standard url mapping can take place).Methods inherited from class org.apache.wicket.request.resource.PackageResourceReference
getMinifiedName, getResource, getUrlAttributes, readBuffered, removeCompressFlagIfUnnecessary
Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getVariation, hashCode, of, of, toString
-
Constructor Details
-
MetaInfStaticResourceReference
Construct.- Parameters:
scope
- mandatory parametername
- mandatory parameter
-
-
Method Details
-
mapHandler
Returns theUrl
for givenIRequestHandler
if "/META-INF/resources" Servlet 3.0 feature is supported ornull
if not (so standard url mapping can take place).- Parameters:
requestHandler
- mandatory parameter- Returns:
- Url instance or
null
.
-
isMetaInfResourcesSupported
-