org.apache.wicket.resource.bundles
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 with
addProvidedResources(org.apache.wicket.markup.head.HeaderItem...)
. Normally, you will
have to register this bundle in ResourceBundles
under
Application.getResourceBundles()
. Dependencies are inherited from the provided resources
if the bundle does not provide them.
- Author:
- papegaaij
- See Also:
- Serialized Form
Methods inherited from class org.apache.wicket.request.resource.ResourceReference |
canBeRegistered, equals, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, toString |
ResourceBundleReference
public ResourceBundleReference(ResourceReference bundleRef)
- Creates a new bundle reference from the given reference.
- Parameters:
bundleRef
-
getBundleReference
public ResourceReference getBundleReference()
- Returns:
- The resource reference that is served for this bundle
addProvidedResources
public void addProvidedResources(HeaderItem... items)
- Adds the
HeaderItem
s that this bundle provides.
- Parameters:
items
-
getResource
public IResource getResource()
- Description copied from class:
ResourceReference
- Returns the resource.
- Specified by:
getResource
in class ResourceReference
- Returns:
- resource instance
getProvidedResources
public Iterable<? extends HeaderItem> getProvidedResources()
- Specified by:
getProvidedResources
in interface IResourceBundle
- Returns:
- the resources that are provided (part of) this resource.
getDependencies
public Iterable<? extends HeaderItem> getDependencies()
- Overrides:
getDependencies
in class ResourceReference
- Returns:
- the resources this ResourceReference depends on.
Copyright © 2006–2016 Apache Software Foundation. All rights reserved.