T
- The type of the header items to bundlepublic class ConcatResourceBundleReference<T extends HeaderItem & IReferenceHeaderItem> extends ResourceReference implements IResourceBundle
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.ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes
Constructor and Description |
---|
ConcatResourceBundleReference(Class<?> scope,
String name,
List<T> resources)
Creates a new
ConcatResourceBundleReference for the given resources. |
ConcatResourceBundleReference(Class<?> scope,
String name,
Locale locale,
String style,
String variation,
List<T> resources)
Creates a new
ConcatResourceBundleReference for the given resources. |
ConcatResourceBundleReference(Class<?> scope,
String name,
T... resources)
Creates a new
ConcatResourceBundleReference for the given resources. |
ConcatResourceBundleReference(String name,
T... resources)
Creates a new
ConcatResourceBundleReference for the given resources. |
Modifier and Type | Method and Description |
---|---|
ITextResourceCompressor |
getCompressor() |
List<HeaderItem> |
getDependencies() |
List<T> |
getProvidedResources() |
IResource |
getResource()
Returns the resource.
|
void |
setCompressor(ITextResourceCompressor compressor) |
canBeRegistered, equals, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, of, of, toString
public ConcatResourceBundleReference(Class<?> scope, String name, List<T> resources)
ConcatResourceBundleReference
for the given resources.scope
- name
- resources
- public ConcatResourceBundleReference(Class<?> scope, String name, T... resources)
ConcatResourceBundleReference
for the given resources.scope
- name
- resources
- public ConcatResourceBundleReference(String name, T... resources)
ConcatResourceBundleReference
for the given resources.name
- resources
- public ConcatResourceBundleReference(Class<?> scope, String name, Locale locale, String style, String variation, List<T> resources)
ConcatResourceBundleReference
for the given resources.scope
- mandatory parametername
- mandatory parameterlocale
- resource localestyle
- resource stylevariation
- resource variationresources
- the resources that are concatenatedpublic IResource getResource()
ResourceReference
getResource
in class ResourceReference
public List<T> getProvidedResources()
getProvidedResources
in interface IResourceBundle
public List<HeaderItem> getDependencies()
getDependencies
in class ResourceReference
public void setCompressor(ITextResourceCompressor compressor)
public ITextResourceCompressor getCompressor()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.