org.apache.wicket.markup.html
Class JavascriptPackageResource
java.lang.Object
org.apache.wicket.Resource
org.apache.wicket.markup.html.WebResource
org.apache.wicket.markup.html.PackageResource
org.apache.wicket.markup.html.CompressedPackageResource
org.apache.wicket.markup.html.JavascriptPackageResource
- All Implemented Interfaces:
- java.io.Serializable, IClusterable, IRequestListener, IResourceListener, IPackageResourceGuard, IModifiable
public class JavascriptPackageResource
- extends CompressedPackageResource
Package resource for javascript files. It strips comments and whitespace from javascript and
gzips the content. The stripped and gzipped version is cached.
- Author:
- Matej Knopp
- See Also:
- Serialized Form
Constructor Summary |
protected |
JavascriptPackageResource(java.lang.Class scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style)
Creates a new javascript package resource. |
Method Summary |
static PackageResource |
get(java.lang.Class scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style)
Gets the resource for a given set of criteria. |
protected IResourceStream |
newResourceStream()
Factory method for creating resource stream instance |
Methods inherited from class org.apache.wicket.markup.html.PackageResource |
accept, bind, bind, bind, bind, bind, exists, get, get, get, getAbsolutePath, getLocale, getPath, getResourceStream, getScope, getStyle, lastModifiedTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavascriptPackageResource
protected JavascriptPackageResource(java.lang.Class scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style)
- Creates a new javascript package resource.
- Parameters:
scope
- path
- locale
- style
-
get
public static PackageResource get(java.lang.Class scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style)
- Gets the resource for a given set of criteria. Only one resource will be loaded for the same
criteria.
- Parameters:
scope
- This argument will be used to get the class loader for loading the package
resource, and to determine what package it is in. Typically this is the class in
which you call this methodpath
- The path to the resourcelocale
- The locale of the resourcestyle
- The style of the resource (see Session
)
- Returns:
- The resource
newResourceStream
protected IResourceStream newResourceStream()
- Description copied from class:
CompressedPackageResource
- Factory method for creating resource stream instance
- Overrides:
newResourceStream
in class CompressedPackageResource
- Returns:
- new stream instance
- See Also:
CompressedPackageResource.newResourceStream()
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.