com.vaadin.terminal
Class ExternalResource

java.lang.Object
  extended by com.vaadin.terminal.ExternalResource
All Implemented Interfaces:
Resource, Serializable

public class ExternalResource
extends Object
implements Resource, Serializable

ExternalResource implements source for resources fetched from location specified by URL:s. The resources are fetched directly by the client terminal and are not fetched trough the terminal adapter.

Since:
3.0
Version:
7.0.0.alpha3
Author:
Vaadin Ltd.
See Also:
Serialized Form

Constructor Summary
ExternalResource(String sourceURL)
          Creates a new download component for downloading directly from given URL.
ExternalResource(String sourceURL, String mimeType)
          Creates a new download component for downloading directly from given URL.
ExternalResource(URL sourceURL)
          Creates a new download component for downloading directly from given URL.
ExternalResource(URL sourceURL, String mimeType)
          Creates a new download component for downloading directly from given URL.
 
Method Summary
 String getMIMEType()
          Gets the MIME type of the resource.
 String getURL()
          Gets the URL of the external resource.
 void setMIMEType(String mimeType)
          Sets the MIME type of the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalResource

public ExternalResource(URL sourceURL)
Creates a new download component for downloading directly from given URL.

Parameters:
sourceURL - the source URL.

ExternalResource

public ExternalResource(URL sourceURL,
                        String mimeType)
Creates a new download component for downloading directly from given URL.

Parameters:
sourceURL - the source URL.
mimeType - the MIME Type

ExternalResource

public ExternalResource(String sourceURL)
Creates a new download component for downloading directly from given URL.

Parameters:
sourceURL - the source URL.

ExternalResource

public ExternalResource(String sourceURL,
                        String mimeType)
Creates a new download component for downloading directly from given URL.

Parameters:
sourceURL - the source URL.
mimeType - the MIME Type
Method Detail

getURL

public String getURL()
Gets the URL of the external resource.

Returns:
the URL of the external resource.

getMIMEType

public String getMIMEType()
Gets the MIME type of the resource.

Specified by:
getMIMEType in interface Resource
Returns:
the MIME type of the resource.
See Also:
Resource.getMIMEType()

setMIMEType

public void setMIMEType(String mimeType)
Sets the MIME type of the resource.



Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.