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 |
getContextName()
Returns the http servlet context name of Vaadin
|
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 |
start(org.osgi.framework.BundleContext context) |
void |
stop() |
public void start(org.osgi.framework.BundleContext context)
throws Exception
Exceptionpublic void stop()
public 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 VaadinResourceServicepublic String getContextName()
VaadinResourceServicegetContextName in interface VaadinResourceServiceCopyright © 2021 Vaadin Ltd. All rights reserved.