Class ResourceBundleReference
- java.lang.Object
-
- org.apache.wicket.request.resource.ResourceReference
-
- org.apache.wicket.resource.bundles.ResourceBundleReference
-
- All Implemented Interfaces:
java.io.Serializable,IResourceBundle,org.apache.wicket.util.io.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 inResourceBundlesunderApplication.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 voidaddProvidedResources(HeaderItem... items)Adds theHeaderItems that this bundle provides.ResourceReferencegetBundleReference()java.util.List<HeaderItem>getDependencies()java.lang.Iterable<? extends HeaderItem>getProvidedResources()IResourcegetResource()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 theHeaderItems that this bundle provides.- Parameters:
items-
-
getResource
public IResource getResource()
Description copied from class:ResourceReferenceReturns the resource.- Specified by:
getResourcein classResourceReference- Returns:
- resource instance
-
getProvidedResources
public java.lang.Iterable<? extends HeaderItem> getProvidedResources()
- Specified by:
getProvidedResourcesin interfaceIResourceBundle- Returns:
- the resources that are provided (part of) this resource.
-
getDependencies
public java.util.List<HeaderItem> getDependencies()
- Overrides:
getDependenciesin classResourceReference- Returns:
- the resources this ResourceReference depends on.
-
-