org.apache.wicket.request.resource
Class UrlResourceReference

java.lang.Object
  extended by org.apache.wicket.request.resource.ResourceReference
      extended by org.apache.wicket.request.resource.UrlResourceReference
All Implemented Interfaces:
Serializable, IClusterable

public class UrlResourceReference
extends ResourceReference

A ResourceReference that can be used to point to a resource by using an Url. For example to a resource residing in a CDN (Content Delivering Network) or context relative one.

Since:
6.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.UrlAttributes
 
Constructor Summary
UrlResourceReference(Url url)
          Constructor.
 
Method Summary
 IResource getResource()
          Returns the resource.
 Url getUrl()
           
 boolean isContextRelative()
           
 UrlResourceReference setContextRelative(boolean contextRelative)
           
 String toString()
           
 
Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UrlResourceReference

public UrlResourceReference(Url url)
Constructor.

Parameters:
url - the url of the external resource
Method Detail

getUrl

public final Url getUrl()
Returns:
the url of the external resource

getResource

public final IResource getResource()
Description copied from class: ResourceReference
Returns the resource.

Specified by:
getResource in class ResourceReference
Returns:
null because this ResourceReference wont use an IResource to deliver the content of the external resource. The browser will make a direct request to the external url.

setContextRelative

public UrlResourceReference setContextRelative(boolean contextRelative)

isContextRelative

public boolean isContextRelative()

toString

public String toString()
Overrides:
toString in class ResourceReference


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.