Class ConcatResourceBundleReference<T extends HeaderItem & IReferenceHeaderItem>
java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.apache.wicket.resource.bundles.ConcatResourceBundleReference<T>
- Type Parameters:
T
- The type of the header items to bundle
- All Implemented Interfaces:
Serializable
,IResourceBundle
,IClusterable
public class ConcatResourceBundleReference<T extends HeaderItem & IReferenceHeaderItem>
extends ResourceReference
implements IResourceBundle
A resource bundle that automatically concatenates the given resources. These resources should all
be of the same type (javascript or css) and all have
IStaticCacheableResource
(or
subclasses). After creating the bundle, you normally have to register it in the
ResourceBundles
under Application.getResourceBundles()
. ResourceBundles
has two utility methods to create instances of this class:
addJavaScriptBundle
and
addCssBundle
.
Dependencies are inherited from the provided resources, if the bundle does not provide all
dependencies itself.- Author:
- papegaaij
- 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
ConstructorDescriptionConcatResourceBundleReference
(Class<?> scope, String name, List<T> resources) Creates a newConcatResourceBundleReference
for the given resources.ConcatResourceBundleReference
(Class<?> scope, String name, Locale locale, String style, String variation, List<T> resources) Creates a newConcatResourceBundleReference
for the given resources.ConcatResourceBundleReference
(Class<?> scope, String name, T... resources) Creates a newConcatResourceBundleReference
for the given resources.ConcatResourceBundleReference
(String name, T... resources) Creates a newConcatResourceBundleReference
for the given resources. -
Method Summary
Modifier and TypeMethodDescriptionReturns the resource.void
setCompressor
(ITextResourceCompressor compressor) Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, of, of, toString
-
Constructor Details
-
ConcatResourceBundleReference
Creates a newConcatResourceBundleReference
for the given resources.- Parameters:
scope
-name
-resources
-
-
ConcatResourceBundleReference
Creates a newConcatResourceBundleReference
for the given resources.- Parameters:
scope
-name
-resources
-
-
ConcatResourceBundleReference
Creates a newConcatResourceBundleReference
for the given resources.- Parameters:
name
-resources
-
-
ConcatResourceBundleReference
public ConcatResourceBundleReference(Class<?> scope, String name, Locale locale, String style, String variation, List<T> resources) Creates a newConcatResourceBundleReference
for the given resources.- Parameters:
scope
- mandatory parametername
- mandatory parameterlocale
- resource localestyle
- resource stylevariation
- resource variationresources
- the resources that are concatenated
-
-
Method Details
-
getResource
Description copied from class:ResourceReference
Returns the resource.- Specified by:
getResource
in classResourceReference
- Returns:
- resource instance
-
getProvidedResources
- Specified by:
getProvidedResources
in interfaceIResourceBundle
- Returns:
- the resources that are provided (part of) this resource.
-
getDependencies
- Overrides:
getDependencies
in classResourceReference
- Returns:
- the resources this ResourceReference depends on.
-
setCompressor
-
getCompressor
-