org.apache.wicket.resource.bundles
Class ConcatBundleResource
java.lang.Object
org.apache.wicket.request.resource.AbstractResource
org.apache.wicket.resource.bundles.ConcatBundleResource
- All Implemented Interfaces:
- Serializable, IStaticCacheableResource, IResource, IClusterable
public class ConcatBundleResource
- extends AbstractResource
- implements IStaticCacheableResource
A resource that concatenates several resources into one download. This
resource can only bundle IStaticCacheableResources. The content type of the resource will
be that of the first resource that specifies its content type.
- Author:
- papegaaij
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.request.resource.IResource |
respond |
ConcatBundleResource
public ConcatBundleResource(List<? extends IReferenceHeaderItem> providedResources)
- Construct.
- Parameters:
providedResources -
newResourceResponse
protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
- Description copied from class:
AbstractResource
- Override this method to return a
AbstractResource.ResourceResponse for the request.
- Specified by:
newResourceResponse in class AbstractResource
- Parameters:
attributes - request attributes
- Returns:
- resource data instance
findContentType
protected String findContentType(List<IResourceStream> resources)
findLastModified
protected Time findLastModified(List<IResourceStream> resources)
readAllResources
protected byte[] readAllResources(List<IResourceStream> resources)
throws IOException,
ResourceStreamNotFoundException
- Throws:
IOException
ResourceStreamNotFoundException
isCachingEnabled
public boolean isCachingEnabled()
- Description copied from interface:
IStaticCacheableResource
- controls whether caching of the resource is enabled or disabled
- Specified by:
isCachingEnabled in interface IStaticCacheableResource
- Returns:
- @{code true} if caching is enabled
setCachingEnabled
public void setCachingEnabled(boolean enabled)
getCacheKey
public Serializable getCacheKey()
- Description copied from interface:
IStaticCacheableResource
- get unique caching key for the resource stream produced by
IStaticCacheableResource.getCacheableResourceStream()
- Specified by:
getCacheKey in interface IStaticCacheableResource
- Returns:
- serializable key with properly supports
#equals(Object) and
#hashCode()
getCacheableResourceStream
public IResourceStream getCacheableResourceStream()
- Description copied from interface:
IStaticCacheableResource
- get static resource stream which will be unique to the related caching key
IStaticCacheableResource.getCacheKey()
- Specified by:
getCacheableResourceStream in interface IStaticCacheableResource
- Returns:
- stream or
null if no stream could be found
setCompressor
public void setCompressor(ITextResourceCompressor compressor)
getCompressor
public ITextResourceCompressor getCompressor()
getThrowExceptionOnMissingResource
protected boolean getThrowExceptionOnMissingResource()
- Returns:
- the result of
IResourceSettings.getThrowExceptionOnMissingResource()
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.