Class UrlResourceReference

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.util.io.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
    • Constructor Detail

      • UrlResourceReference

        public UrlResourceReference​(org.apache.wicket.request.Url url)
        Constructor.
        Parameters:
        url - the url of the external resource
    • Method Detail

      • getUrl

        public final org.apache.wicket.request.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 won't use an IResource to deliver the content of the external resource. The browser will make a direct request to the external url.
      • isContextRelative

        public boolean isContextRelative()