public class VaadinResourceServiceImpl extends Object implements VaadinResourceService
VaadinResourceService. Uses bundle version as a
prefix for the /VAADIN/ folder.| Constructor and Description |
|---|
VaadinResourceServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getResourcePathPrefix()
Returns the prefix of the versioned namespace for the resources.
|
void |
publishResource(String resource,
org.osgi.service.http.HttpService httpService)
Register the resource with the given name under the
VaadinResourceService versioned namespace. |
void |
publishTheme(String themeName,
org.osgi.service.http.HttpService httpService)
Register the theme with the given name under the
VaadinResourceService versioned namespace. |
void |
publishWidgetset(String widgetset,
org.osgi.service.http.HttpService httpService)
Register the widgetset with the given name under the
VaadinResourceService versioned namespace. |
void |
setBundleVersion(String bundleVersion)
Sets the version of the bundle managing this service.
|
public void setBundleVersion(String bundleVersion)
This needs to be called before any other method after the service is created.
bundleVersion - the version of the bundle managing this servicepublic void publishTheme(String themeName, org.osgi.service.http.HttpService httpService) throws org.osgi.service.http.NamespaceException
VaadinResourceServiceVaadinResourceService versioned namespace. The theme folder is
expected to be compiled and under "/VAADIN/themes/" in the calling
bundle.
The theme will become accessible under the url
"/vaadin-x.x.x/VAADIN/themes/themeName" where x.x.x is the version of the
Vaadin Shared bundlepublishTheme in interface VaadinResourceServicethemeName - the name of the themehttpService - the HttpService instance for the calling bundleorg.osgi.service.http.NamespaceException - if there is a clash during the theme registrationpublic void publishResource(String resource, org.osgi.service.http.HttpService httpService) throws org.osgi.service.http.NamespaceException
VaadinResourceServiceVaadinResourceService versioned namespace. The resource is
expected to be under "/VAADIN/" in the calling bundle.
The resource will become accessible under the url "/vaadin-x.x.x/VAADIN/"
where x.x.x is the version of the Vaadin Shared bundlepublishResource in interface VaadinResourceServiceresource - the name of the resourcehttpService - the HttpService instance for the calling bundleorg.osgi.service.http.NamespaceException - if there is a clash during the theme registrationpublic void publishWidgetset(String widgetset, org.osgi.service.http.HttpService httpService) throws org.osgi.service.http.NamespaceException
VaadinResourceServiceVaadinResourceService versioned namespace. The resource is
expected to be under "/VAADIN/widgetsets" in the calling bundle.
The resource will become accessible under the url
"/vaadin-x.x.x/VAADIN/widgetsets" where x.x.x is the version of the
Vaadin Shared bundlepublishWidgetset in interface VaadinResourceServicewidgetset - the name of the resourcehttpService - the HttpService instance for the calling bundleorg.osgi.service.http.NamespaceException - if there is a clash during the theme registrationpublic String getResourcePathPrefix()
VaadinResourceServicegetResourcePathPrefix in interface VaadinResourceServiceCopyright © 2017 Vaadin Ltd. All rights reserved.