aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/ExternalResource.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-13 18:34:33 +0300
committerArtur Signell <artur@vaadin.com>2012-08-13 19:18:33 +0300
commite85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (patch)
tree9ab6f13f7188cab44bbd979b1cf620f15328a03f /src/com/vaadin/terminal/ExternalResource.java
parent14dd4d0b28c76eb994b181a4570f3adec53342e6 (diff)
downloadvaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.tar.gz
vaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.zip
Moved server files to a server src folder (#9299)
Diffstat (limited to 'src/com/vaadin/terminal/ExternalResource.java')
-rw-r--r--src/com/vaadin/terminal/ExternalResource.java118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/com/vaadin/terminal/ExternalResource.java b/src/com/vaadin/terminal/ExternalResource.java
deleted file mode 100644
index 84fcc65a44..0000000000
--- a/src/com/vaadin/terminal/ExternalResource.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.terminal;
-
-import java.io.Serializable;
-import java.net.URL;
-
-import com.vaadin.service.FileTypeResolver;
-
-/**
- * <code>ExternalResource</code> 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.
- *
- * @author Vaadin Ltd.
- * @version
- * @VERSION@
- * @since 3.0
- */
-@SuppressWarnings("serial")
-public class ExternalResource implements Resource, Serializable {
-
- /**
- * Url of the download.
- */
- private String sourceURL = null;
-
- /**
- * MIME Type for the resource
- */
- private String mimeType = null;
-
- /**
- * Creates a new download component for downloading directly from given URL.
- *
- * @param sourceURL
- * the source URL.
- */
- public ExternalResource(URL sourceURL) {
- if (sourceURL == null) {
- throw new RuntimeException("Source must be non-null");
- }
-
- this.sourceURL = sourceURL.toString();
- }
-
- /**
- * Creates a new download component for downloading directly from given URL.
- *
- * @param sourceURL
- * the source URL.
- * @param mimeType
- * the MIME Type
- */
- public ExternalResource(URL sourceURL, String mimeType) {
- this(sourceURL);
- this.mimeType = mimeType;
- }
-
- /**
- * Creates a new download component for downloading directly from given URL.
- *
- * @param sourceURL
- * the source URL.
- */
- public ExternalResource(String sourceURL) {
- if (sourceURL == null) {
- throw new RuntimeException("Source must be non-null");
- }
-
- this.sourceURL = sourceURL.toString();
- }
-
- /**
- * Creates a new download component for downloading directly from given URL.
- *
- * @param sourceURL
- * the source URL.
- * @param mimeType
- * the MIME Type
- */
- public ExternalResource(String sourceURL, String mimeType) {
- this(sourceURL);
- this.mimeType = mimeType;
- }
-
- /**
- * Gets the URL of the external resource.
- *
- * @return the URL of the external resource.
- */
- public String getURL() {
- return sourceURL;
- }
-
- /**
- * Gets the MIME type of the resource.
- *
- * @see com.vaadin.terminal.Resource#getMIMEType()
- */
- @Override
- public String getMIMEType() {
- if (mimeType == null) {
- mimeType = FileTypeResolver.getMIMEType(getURL().toString());
- }
- return mimeType;
- }
-
- /**
- * Sets the MIME type of the resource.
- */
- public void setMIMEType(String mimeType) {
- this.mimeType = mimeType;
- }
-
-}