File tree 2 files changed +12
-23
lines changed
bundles/org.openhab.ui.habot/src/main/java/org/openhab/ui/habot
2 files changed +12
-23
lines changed Original file line number Diff line number Diff line change 17
17
import org .eclipse .smarthome .core .common .registry .ManagedProvider ;
18
18
import org .eclipse .smarthome .core .storage .StorageService ;
19
19
import org .openhab .ui .habot .card .Card ;
20
+ import org .osgi .service .component .annotations .Activate ;
20
21
import org .osgi .service .component .annotations .Component ;
21
22
import org .osgi .service .component .annotations .Reference ;
22
- import org .osgi .service .component .annotations .ReferencePolicy ;
23
23
24
24
/**
25
25
* The @link {@link ManagedProvider} for {@link Card} elements
29
29
@ Component (service = CardProvider .class , immediate = true )
30
30
public class CardProvider extends DefaultAbstractManagedProvider <Card , String > {
31
31
32
+ @ Activate
33
+ public CardProvider (final @ Reference StorageService storageService ) {
34
+ super (storageService );
35
+ }
36
+
32
37
@ Override
33
38
protected String getStorageName () {
34
39
return "habot_cards" ;
@@ -39,14 +44,4 @@ protected String getStorageName() {
39
44
return key ;
40
45
}
41
46
42
- @ Reference (policy = ReferencePolicy .DYNAMIC )
43
- @ Override
44
- protected void setStorageService (StorageService storageService ) {
45
- super .setStorageService (storageService );
46
- }
47
-
48
- @ Override
49
- protected void unsetStorageService (StorageService storageService ) {
50
- super .unsetStorageService (storageService );
51
- }
52
47
}
Original file line number Diff line number Diff line change 18
18
import org .eclipse .smarthome .core .storage .StorageService ;
19
19
import org .openhab .ui .habot .notification .internal .webpush .Subscription ;
20
20
import org .openhab .ui .habot .notification .internal .webpush .Subscription .Keys ;
21
+ import org .osgi .service .component .annotations .Activate ;
21
22
import org .osgi .service .component .annotations .Component ;
22
23
import org .osgi .service .component .annotations .Reference ;
23
- import org .osgi .service .component .annotations .ReferencePolicy ;
24
24
25
25
/**
26
26
* The @link {@link ManagedProvider} for {@link Subscription} elements
30
30
@ Component (service = SubscriptionProvider .class , immediate = true )
31
31
public class SubscriptionProvider extends DefaultAbstractManagedProvider <Subscription , Keys > {
32
32
33
+ @ Activate
34
+ public SubscriptionProvider (final @ Reference StorageService storageService ) {
35
+ super (storageService );
36
+ }
37
+
33
38
@ Override
34
39
protected String getStorageName () {
35
40
return "habot_webpush_subscriptions" ;
@@ -41,15 +46,4 @@ protected String getStorageName() {
41
46
return String .format ("%s.%s" , key .p256dh , key .auth );
42
47
}
43
48
44
- @ Reference (policy = ReferencePolicy .DYNAMIC )
45
- @ Override
46
- protected void setStorageService (StorageService storageService ) {
47
- super .setStorageService (storageService );
48
- }
49
-
50
- @ Override
51
- protected void unsetStorageService (StorageService storageService ) {
52
- super .unsetStorageService (storageService );
53
- }
54
-
55
49
}
You can’t perform that action at this time.
0 commit comments