aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-client-compiled
diff options
context:
space:
mode:
authorS.W <wimmesberger@gmail.com>2018-09-21 10:01:52 +0200
committerIlia Motornyi <elmot@vaadin.com>2018-09-21 11:01:52 +0300
commit7e89b5e3348be487110bd8a5c60336ff363cf9d6 (patch)
tree4913034eb366e7173bc083abae4c6ba3b9a19402 /compatibility-client-compiled
parentc534fb8e609c38c7b4821b5f79ec697b384c0809 (diff)
downloadvaadin-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 'compatibility-client-compiled')
-rw-r--r--compatibility-client-compiled/src/main/java/com/vaadin/osgi/compatibility/widgetset/CompatibilityWidgetsetContribution.java29
1 files changed, 6 insertions, 23 deletions
diff --git a/compatibility-client-compiled/src/main/java/com/vaadin/osgi/compatibility/widgetset/CompatibilityWidgetsetContribution.java b/compatibility-client-compiled/src/main/java/com/vaadin/osgi/compatibility/widgetset/CompatibilityWidgetsetContribution.java
index 155d7070b3..b4b7d5c064 100644
--- a/compatibility-client-compiled/src/main/java/com/vaadin/osgi/compatibility/widgetset/CompatibilityWidgetsetContribution.java
+++ b/compatibility-client-compiled/src/main/java/com/vaadin/osgi/compatibility/widgetset/CompatibilityWidgetsetContribution.java
@@ -15,33 +15,16 @@
*/
package com.vaadin.osgi.compatibility.widgetset;
-import org.osgi.service.component.ComponentContext;
-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;
-
-@Component(immediate = true)
-public class CompatibilityWidgetsetContribution {
- private HttpService httpService;
+import com.vaadin.osgi.resources.OsgiVaadinWidgetset;
+@Component
+public class CompatibilityWidgetsetContribution implements OsgiVaadinWidgetset {
private static final String WIDGETSET_NAME = "com.vaadin.v7.Vaadin7WidgetSet";
- @Activate
- void startup(ComponentContext context) throws Exception {
- VaadinResourceService service = OsgiVaadinResources.getService();
- service.publishWidgetset(WIDGETSET_NAME, httpService);
- }
-
- @Reference
- void setHttpService(HttpService httpService) {
- this.httpService = httpService;
- }
-
- void unsetHttpService(HttpService httpService) {
- this.httpService = null;
+ @Override
+ public String getName() {
+ return WIDGETSET_NAME;
}
}