org.apache.wicket.request.resource
Class PackageResource
java.lang.Object
org.apache.wicket.request.resource.AbstractResource
org.apache.wicket.request.resource.PackageResource
- All Implemented Interfaces:
- java.io.Serializable, IResource
public class PackageResource
- extends AbstractResource
- See Also:
- Serialized Form
Constructor Summary |
protected |
PackageResource(java.lang.Class<?> scope,
java.lang.String name,
java.util.Locale locale,
java.lang.String style,
java.lang.String variation)
Hidden constructor. |
Method Summary |
static boolean |
exists(java.lang.Class<?> scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style,
java.lang.String variation)
Gets whether a resource for a given set of criteria exists. |
java.lang.Class<?> |
getScope()
Gets the scoping class, used for class loading and to determine the package. |
java.lang.String |
getStyle()
Gets the style. |
protected AbstractResource.ResourceResponse |
newResourceResponse(IResource.Attributes attributes)
creates a new resource response based on the request attributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackageResource
protected PackageResource(java.lang.Class<?> scope,
java.lang.String name,
java.util.Locale locale,
java.lang.String style,
java.lang.String variation)
- Hidden constructor.
- Parameters:
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)
getScope
public final java.lang.Class<?> getScope()
- Gets the scoping class, used for class loading and to determine the package.
- Returns:
- the scoping class
getStyle
public final java.lang.String getStyle()
- Gets the style.
- Returns:
- the style
newResourceResponse
protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
- creates a new resource response based on the request attributes
- Specified by:
newResourceResponse
in class AbstractResource
- Parameters:
attributes
- current request attributes from client
- Returns:
- resource response for answering request
exists
public static boolean exists(java.lang.Class<?> scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style,
java.lang.String variation)
- Gets whether a resource for a given set of criteria exists.
- 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
)variation
- The component's variation (of the style)
- Returns:
- true if a resource could be loaded, false otherwise
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.