com.vaadin.shared
Class VaadinUriResolver

java.lang.Object
  extended by com.vaadin.shared.VaadinUriResolver
All Implemented Interfaces:
java.io.Serializable

public abstract class VaadinUriResolver
extends java.lang.Object
implements java.io.Serializable

Utility for translating special Vaadin URIs like theme:// and app:// into URLs usable by the browser. This is an abstract class performing the main logic in resolveVaadinUri(String) and using abstract methods in the class for accessing information specific to the current environment.

Since:
7.4
Author:
Vaadin Ltd
See Also:
Serialized Form

Constructor Summary
VaadinUriResolver()
           
 
Method Summary
protected abstract  java.lang.String encodeQueryStringParameterValue(java.lang.String parameterValue)
          Encodes a value for safe inclusion as a parameter in the query string.
protected abstract  java.lang.String getServiceUrl()
          Gets the URL handled by VaadinService to handle application requests.
protected abstract  java.lang.String getServiceUrlParameterName()
          Gets the name of the request parameter that should be used for sending the requested URL to the service URL.
protected abstract  java.lang.String getThemeUri()
          Gets the URI of the directory of the current theme.
protected abstract  java.lang.String getVaadinDirUrl()
          Gets the URL pointing to the VAADIN directory.
 java.lang.String resolveVaadinUri(java.lang.String vaadinUri)
          Translates a Vaadin URI to a URL that can be loaded by the browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VaadinUriResolver

public VaadinUriResolver()
Method Detail

resolveVaadinUri

public java.lang.String resolveVaadinUri(java.lang.String vaadinUri)
Translates a Vaadin URI to a URL that can be loaded by the browser. The following URI schemes are supported: Any other URI protocols, such as http:// or https:// are passed through this method unmodified.

Parameters:
vaadinUri - the uri to resolve
Returns:
the resolved uri
Since:
7.4

getVaadinDirUrl

protected abstract java.lang.String getVaadinDirUrl()
Gets the URL pointing to the VAADIN directory.

Returns:
the VAADIN directory URL

getServiceUrlParameterName

protected abstract java.lang.String getServiceUrlParameterName()
Gets the name of the request parameter that should be used for sending the requested URL to the service URL. If null is returned, the requested URL will instead be appended to the base service URL.

Returns:
the parameter name used for passing request URLs, or null to send the path as a part of the request path.

getServiceUrl

protected abstract java.lang.String getServiceUrl()
Gets the URL handled by VaadinService to handle application requests.

Returns:
the service URL

getThemeUri

protected abstract java.lang.String getThemeUri()
Gets the URI of the directory of the current theme.

Returns:
the URI of the current theme directory

encodeQueryStringParameterValue

protected abstract java.lang.String encodeQueryStringParameterValue(java.lang.String parameterValue)
Encodes a value for safe inclusion as a parameter in the query string.

Parameters:
parameterValue - the value to encode
Returns:
the encoded value


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