Class ResourceBundleReference
- java.lang.Object
-
- org.apache.wicket.request.resource.ResourceReference
-
- org.apache.wicket.resource.bundles.ResourceBundleReference
-
- All Implemented Interfaces:
Serializable
,IResourceBundle
,IClusterable
- Direct Known Subclasses:
ReplacementResourceBundleReference
public class ResourceBundleReference extends ResourceReference implements IResourceBundle
A resource reference that wraps another resource to make it into a bundle. The resources that are provided by the wrapped reference, have to be added withaddProvidedResources(org.apache.wicket.markup.head.HeaderItem...)
. Normally, you will have to register this bundle inResourceBundles
underApplication.getResourceBundles()
. Dependencies are inherited from the provided resources if the bundle does not provide them.- Author:
- papegaaij
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes
-
-
Constructor Summary
Constructors Constructor Description ResourceBundleReference(ResourceReference bundleRef)
Creates a new bundle reference from the given reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProvidedResources(HeaderItem... items)
Adds theHeaderItem
s that this bundle provides.ResourceReference
getBundleReference()
List<HeaderItem>
getDependencies()
Iterable<? extends HeaderItem>
getProvidedResources()
IResource
getResource()
Returns the resource.-
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 Detail
-
ResourceBundleReference
public ResourceBundleReference(ResourceReference bundleRef)
Creates a new bundle reference from the given reference.- Parameters:
bundleRef
-
-
-
Method Detail
-
getBundleReference
public ResourceReference getBundleReference()
- Returns:
- The resource reference that is served for this bundle
-
addProvidedResources
public void addProvidedResources(HeaderItem... items)
Adds theHeaderItem
s that this bundle provides.- Parameters:
items
-
-
getResource
public IResource getResource()
Description copied from class:ResourceReference
Returns the resource.- Specified by:
getResource
in classResourceReference
- Returns:
- resource instance
-
getProvidedResources
public Iterable<? extends HeaderItem> getProvidedResources()
- Specified by:
getProvidedResources
in interfaceIResourceBundle
- Returns:
- the resources that are provided (part of) this resource.
-
getDependencies
public List<HeaderItem> getDependencies()
- Overrides:
getDependencies
in classResourceReference
- Returns:
- the resources this ResourceReference depends on.
-
-