Package com.vaadin.featurepack.server
Class ExternalResource
java.lang.Object
com.vaadin.featurepack.server.ExternalResource
- All Implemented Interfaces:
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
- Author:
- Vaadin Ltd.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExternalResource(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
Modifier and TypeMethodDescriptionGets the MIME type of the resource.getURL()Gets the URL of the external resource.voidsetMIMEType(String mimeType) Sets the MIME type of the resource.
-
Constructor Details
-
ExternalResource
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL- the source URL.
-
ExternalResource
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL- the source URL.mimeType- the MIME Type
-
ExternalResource
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL- the source URL.
-
ExternalResource
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL- the source URL.mimeType- the MIME Type
-
-
Method Details
-
getURL
Gets the URL of the external resource.- Returns:
- the URL of the external resource.
-
getMIMEType
Gets the MIME type of the resource.- Specified by:
getMIMETypein interfaceResource- Returns:
- the MIME type of the resource.
- See Also:
-
setMIMEType
Sets the MIME type of the resource.
-