public class JavaScriptPackageResource extends PackageResource
PackageResource.PackageResourceBlockedExceptionAbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesCONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS| Constructor and Description |
|---|
JavaScriptPackageResource(Class<?> scope,
String name,
Locale locale,
String style,
String variation)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected IJavaScriptCompressor |
getCompressor()
Gets the
IJavaScriptCompressor to be used. |
protected byte[] |
processResponse(IResource.Attributes attributes,
byte[] bytes)
Gives a chance to modify the resource going to be written in the response
|
accept, equals, exists, exists, getCacheKey, getCompress, getResourceStream, getScope, getStyle, getTextEncoding, hashCode, isCachingEnabled, newResourceResponse, readBuffered, setCachingEnabled, setCompress, setTextEncoding, toStringconfigureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaderspublic JavaScriptPackageResource(Class<?> scope, String name, Locale locale, String style, String variation)
scope - This argument will be used to get the class loader for loading the package
resource, and to determine what package it is inname - The relative path to the resourcelocale - The locale of the resourcestyle - The style of the resourcevariation - The component's variation (of the style)protected byte[] processResponse(IResource.Attributes attributes, byte[] bytes)
PackageResourceprocessResponse in class PackageResourceattributes - current request attributes from clientbytes - the original responseprotected IJavaScriptCompressor getCompressor()
IJavaScriptCompressor to be used. By default returns the configured
compressor on application level, but can be overriden by the user application to provide
compressor specific to the resource.null.Copyright © 2006–2018 Apache Software Foundation. All rights reserved.