org.apache.wicket.request.resource
Class PackageResource

java.lang.Object
  extended by org.apache.wicket.request.resource.PackageResource
All Implemented Interfaces:
java.io.Serializable, IResource

public class PackageResource
extends java.lang.Object
implements IResource

See Also:
Serialized Form

Nested Class Summary
static class PackageResource.PackageResourceBlockedException
          Exception thrown when the creation of a package resource is not allowed.
 
Nested classes/interfaces inherited from interface org.apache.wicket.request.resource.IResource
IResource.Attributes
 
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.
 void respond(IResource.Attributes attributes)
          Renders this resource to response using the provided attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 in
name - The relative path to the resource
locale - The locale of the resource
style - The style of the resource
variation - The component's variation (of the style)
Method Detail

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

respond

public void respond(IResource.Attributes attributes)
Description copied from interface: IResource
Renders this resource to response using the provided attributes.

Specified by:
respond in interface IResource

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 method
path - The path to the resource
locale - The locale of the resource
style - 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.