diff options
author | S.W <wimmesberger@gmail.com> | 2018-09-21 10:01:52 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-09-21 11:01:52 +0300 |
commit | 7e89b5e3348be487110bd8a5c60336ff363cf9d6 (patch) | |
tree | 4913034eb366e7173bc083abae4c6ba3b9a19402 /themes | |
parent | c534fb8e609c38c7b4821b5f79ec697b384c0809 (diff) | |
download | vaadin-framework-7e89b5e3348be487110bd8a5c60336ff363cf9d6.tar.gz vaadin-framework-7e89b5e3348be487110bd8a5c60336ff363cf9d6.zip |
OSGi resource registration via SCR (#11166)
* Changed the way resources, themes, and widgetsets are registered to the HttpService by only using the VaadinResourceTrackerComponent
Diffstat (limited to 'themes')
-rw-r--r-- | themes/src/main/java/com/vaadin/osgi/themes/ValoThemeContribution.java | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/themes/src/main/java/com/vaadin/osgi/themes/ValoThemeContribution.java b/themes/src/main/java/com/vaadin/osgi/themes/ValoThemeContribution.java index 4161c31e9e..29e7394e9c 100644 --- a/themes/src/main/java/com/vaadin/osgi/themes/ValoThemeContribution.java +++ b/themes/src/main/java/com/vaadin/osgi/themes/ValoThemeContribution.java @@ -15,31 +15,14 @@ */ package com.vaadin.osgi.themes; -import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; -import org.osgi.service.http.HttpService; -import com.vaadin.osgi.resources.OsgiVaadinResources; -import com.vaadin.osgi.resources.VaadinResourceService; +import com.vaadin.osgi.resources.OsgiVaadinTheme; -@Component(immediate = true) -public class ValoThemeContribution { - - private HttpService httpService; - - @Activate - void startup() throws Exception { - VaadinResourceService service = OsgiVaadinResources.getService(); - service.publishTheme("valo", httpService); - } - - @Reference - void setHttpService(HttpService httpService) { - this.httpService = httpService; - } - - void unsetHttpService(HttpService httpService) { - this.httpService = null; +@Component +public class ValoThemeContribution implements OsgiVaadinTheme { + @Override + public String getName() { + return "valo"; } } |