com.vaadin.osgi.resources.
Interface VaadinResourceService
-
All Known Implementing Classes:
public interface VaadinResourceService
Service used to publish themes, widgetsets and static resources at the root of a versioned namespaced /VAADIN/ folder.
Since:
8.1
Author:
Vaadin Ltd.
-
-
Method Summary
All Methods Modifier and Type Method and Description String
getResourcePathPrefix()
Returns the prefix of the versioned namespace for the resources.
void
publishResource(String resourceName, HttpService httpService)
Register the resource with the given name under the
VaadinResourceService
versioned namespace.void
publishTheme(String themeName, HttpService httpService)
Register the theme with the given name under the
VaadinResourceService
versioned namespace.void
publishWidgetset(String widgetsetName, HttpService httpService)
Register the widgetset with the given name under the
VaadinResourceService
versioned namespace.
-
-
-
Method Detail
-
publishTheme
void publishTheme(String themeName, HttpService httpService) throws NamespaceException
Register the theme with the given name under the
VaadinResourceService
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 bundleParameters:
themeName
- the name of the themehttpService
- theHttpService
instance for the calling bundleThrows:
NamespaceException
- if there is a clash during the theme registration
-
publishResource
void publishResource(String resourceName, HttpService httpService) throws NamespaceException
Register the resource with the given name under the
VaadinResourceService
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 bundleParameters:
resourceName
- the name of the resourcehttpService
- theHttpService
instance for the calling bundleThrows:
NamespaceException
- if there is a clash during the theme registration
-
publishWidgetset
void publishWidgetset(String widgetsetName, HttpService httpService) throws NamespaceException
Register the widgetset with the given name under the
VaadinResourceService
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 bundleParameters:
widgetsetName
- the name of the resourcehttpService
- theHttpService
instance for the calling bundleThrows:
NamespaceException
- if there is a clash during the theme registration
-
getResourcePathPrefix
String getResourcePathPrefix()
Returns the prefix of the versioned namespace for the resources. The result can't be null and is of the format "vaadin-x.x.x" where x.x.x the version of the Vaadin Shared bundle.
Returns:
the prefix of the resources folder managed by this service
-
-