Package com.vaadin.client
Class URIResolver
java.lang.Object
com.vaadin.flow.shared.VaadinUriResolver
com.vaadin.client.URIResolver
- All Implemented Interfaces:
Serializable
public class URIResolver
extends com.vaadin.flow.shared.VaadinUriResolver
Client side URL resolver for vaadin protocols.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionURIResolver(Registry registry) Creates a new instance connected to the given registry. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetBaseRelativeUri(String baseURI, String uri) Returns the given uri as relative to the given base uri.protected Stringstatic StringReturns the current document location as relative to the base uri of the document.resolveVaadinUri(String uri) Translates a Vaadin URI to a URL that can be loaded by the browser.Methods inherited from class com.vaadin.flow.shared.VaadinUriResolver
resolveVaadinUri
-
Constructor Details
-
URIResolver
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Details
-
resolveVaadinUri
Translates a Vaadin URI to a URL that can be loaded by the browser. The following URI schemes are supported:"context://"- resolves to the application context root"base://"- resolves to the base URI of the page
http://orhttps://are passed through this method unmodified.- Parameters:
uri- the URI to resolve- Returns:
- the resolved URI
-
getContextRootUrl
-
getCurrentLocationRelativeToBaseUri
Returns the current document location as relative to the base uri of the document.- Returns:
- the document current location as relative to the document base uri
-
getBaseRelativeUri
Returns the given uri as relative to the given base uri.- Parameters:
baseURI- the base uri of the documenturi- an absolute uri to transform- Returns:
- the uri as relative to the document base uri, or the given uri unmodified if it is for different context.
-