org.apache.wicket.resource.bundles
Class ResourceBundleReference

java.lang.Object
  extended by org.apache.wicket.request.resource.ResourceReference
      extended by org.apache.wicket.resource.bundles.ResourceBundleReference
All Implemented Interfaces:
Serializable, IResourceBundle, IClusterable

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.UrlAttributes
 
Constructor Summary
ResourceBundleReference(ResourceReference bundleRef)
          Creates a new bundle reference from the given reference.
 
Method Summary
 void addProvidedResources(HeaderItem... items)
          Adds the HeaderItems that this bundle provides.
 ResourceReference getBundleReference()
           
 Iterable<? extends 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, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 the HeaderItems 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-2013 Apache Software Foundation. All Rights Reserved.