From 096a6b10564d853b7923368ce3dc0961b225b1a0 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 25 Mar 2023 11:30:30 +0100 Subject: [PATCH] Update docs for OSGi R8 upgrade (#2037) Signed-off-by: Wouter Born --- developers/guidelines.md | 2 +- developers/osgi/configadmin.md | 6 +++--- developers/osgi/equinox.md | 6 +++--- developers/osgi/eventadmin.md | 6 +++--- developers/osgi/osgi.md | 12 ++++++------ developers/osgi/osgids.md | 10 +++++----- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/developers/guidelines.md b/developers/guidelines.md index b50892443..c2cf4b7f2 100644 --- a/developers/guidelines.md +++ b/developers/guidelines.md @@ -133,7 +133,7 @@ Data-transfer-objects (DTOs map from JSON/XML to Java classes) do not require Ja ## D. Language Levels and Libraries 1. openHAB generally targets the long time supported Java 17 release. -1. The [OSGi Core Release 7](https://osgi.org/download/r7/osgi.core-7.0.0.pdf) with [OSGi Compendium Release 7](https://osgi.org/download/r7/osgi.cmpn-7.0.0.pdf) is targeted, and newer features should not be used. +1. The [OSGi Core Release 8](https://osgi.org/download/r8/osgi.core-8.0.0.pdf) with [OSGi Compendium Release 8](https://osgi.org/download/r8/osgi.cmpn-8.0.0.pdf) is targeted, and newer features should not be used. 1. [SLF4J](http://slf4j.org) is used for logging. You might also have the need to use other libraries for specific use cases like XML processing, networking etc. diff --git a/developers/osgi/configadmin.md b/developers/osgi/configadmin.md index da7aca01a..98d931383 100644 --- a/developers/osgi/configadmin.md +++ b/developers/osgi/configadmin.md @@ -5,7 +5,7 @@ title: Configuration Admin # Configuration Admin Service -As defined in the [OSGi Compendium Release 7][OSGi-cmpn] _configuration is the process of defining the configuration data of bundles and assuring that those bundles receive that data when they are active in the OSGi Service Platform._ +As defined in the [OSGi Compendium Release 8][OSGi-cmpn] _configuration is the process of defining the configuration data of bundles and assuring that those bundles receive that data when they are active in the OSGi Service Platform._ In OSGi, configurations are stored in a central database that is being managed by a special service - the _Configuration Admin Service_(`org.osgi.service.cm.ConfigurationAdmin`). This service monitors the service registry and **provides a configuration to the services** that are registered with a _service.pid_ property. @@ -154,9 +154,9 @@ If the location is not set correctly the Config Admin may not send the update to ## Further Reading -- [OSGi Compendium Release 7][OSGi-cmpn] +- [OSGi Compendium Release 8][OSGi-cmpn] - - - -[OSGi-cmpn]: https://osgi.org/download/r7/osgi.cmpn-7.0.0.pdf +[OSGi-cmpn]: https://osgi.org/download/r8/osgi.cmpn-8.0.0.pdf diff --git a/developers/osgi/equinox.md b/developers/osgi/equinox.md index 39711d633..016fd3ac0 100644 --- a/developers/osgi/equinox.md +++ b/developers/osgi/equinox.md @@ -5,7 +5,7 @@ title: Equinox # Equinox -[Equinox][Equinox] is considered to be a reference implementation of the [OSGi Core Release 7][OSGi-core]. +[Equinox][Equinox] is considered to be a reference implementation of the [OSGi Core Release 8][OSGi-core]. It is an [open source project][Equinox-repo], part of the [Eclipse project][Eclipse]. It provides a set of bundles, that implement various optional OSGi services. @@ -96,7 +96,7 @@ Some or all of these bundles must be included in your runtime configuration, if Name | Bundle Symbolic Name | Description -------- | -------- | -------- Declarative Services | org.eclipse.equinox.ds | An implementation of the OSGi [Declarative Services](osgids.html) specification -Event Admin Service | org.eclipse.equinox.event | OSGi Compendium Release 7 [Event Admin](https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/event/EventAdmin.html) Service provides an inter-bundle communication mechanism based on an event publish and subscribe model +Event Admin Service | org.eclipse.equinox.event | OSGi Compendium Release 8 [Event Admin](https://osgi.org/javadoc/osgi.cmpn/8.0.0/org/osgi/service/event/EventAdmin.html) Service provides an inter-bundle communication mechanism based on an event publish and subscribe model Equinox Utilities | org.eclipse.equinox.util | A library of utility classes that are frequently used from the Equinox OSGi Service implementation bundles OSGi Services API | org.eclipse.osgi.service | This bundle contains the set of OSGi specified service APIs @@ -121,7 +121,7 @@ Table 2. OSGi Bundles (Full list can be found at: - [fig1]:images/event-admin.png -[OSGi-cmpn]: https://osgi.org/download/r7/osgi.cmpn-7.0.0.pdf +[OSGi-cmpn]: https://osgi.org/download/r8/osgi.cmpn-8.0.0.pdf diff --git a/developers/osgi/osgi.md b/developers/osgi/osgi.md index 0e9fb5549..635247460 100644 --- a/developers/osgi/osgi.md +++ b/developers/osgi/osgi.md @@ -65,7 +65,7 @@ Import-Package: org.example.required Export-Package: org.example.provided ``` -[OSGi Core Release 7, Chapter 3: Module Layer][OSGi-core] contains detailed information about the _Module Layer_ and description of the headers (_Manifest-Version_, _Bundle-ManifestVersion_, _Bundle-Name_) used in this example. +[OSGi Core Release 8, Chapter 3: Module Layer][OSGi-core] contains detailed information about the _Module Layer_ and description of the headers (_Manifest-Version_, _Bundle-ManifestVersion_, _Bundle-Name_) used in this example. Bundles are used often to register and consume services. You will find more information about that in the [Services](#services) section. @@ -153,9 +153,9 @@ We will list the most popular OSGi containers with a short description of their ## Important Definitions -**bundle** - a unit of modularization, defined by the OSGi framework. A bundle is comprised of Java classes and other resources, which together can provide functions to end users. For more detailed definition - [OSGi Core Release 7, Chapter 3.2: Bundles][OSGi-core] +**bundle** - a unit of modularization, defined by the OSGi framework. A bundle is comprised of Java classes and other resources, which together can provide functions to end users. For more detailed definition - [OSGi Core Release 8, Chapter 3.2: Bundles][OSGi-core] -**service** - any object that is registered in the OSGi Service Registry and can be looked up using its interface name(s). Definition - [OSGi Core Release 7, Chapter 5.2: Services][OSGi-core] +**service** - any object that is registered in the OSGi Service Registry and can be looked up using its interface name(s). Definition - [OSGi Core Release 8, Chapter 5.2: Services][OSGi-core] **manifest** - descriptive information about the bundle, contained in its JAR file @@ -163,15 +163,15 @@ We will list the most popular OSGi containers with a short description of their ## Further Reading -- [OSGi Core Release 7][OSGi-core] -- [OSGi API](https://osgi.org/javadoc/osgi.core/7.0.0/) +- [OSGi Core Release 8][OSGi-core] +- [OSGi API](https://osgi.org/javadoc/osgi.core/8.0.0/) - [OSGi Vogella guide](http://www.vogella.com/tutorials/OSGi/article.html) - [Lifecycle of a bundle](https://developer.atlassian.com/docs/atlassian-platform-common-components/plugin-framework/behind-the-scenes-in-the-plugin-framework/lifecycle-of-a-bundle) - [OSGi enRoute](https://enroute.osgi.org/) - [OSGi]: https://www.osgi.org/ -[OSGi-core]: https://osgi.org/download/r7/osgi.core-7.0.0.pdf +[OSGi-core]: https://osgi.org/download/r8/osgi.core-8.0.0.pdf [fig1]:images/layeringosgi.png [fig2]:images/states.png [fig3]:images/services.png diff --git a/developers/osgi/osgids.md b/developers/osgi/osgids.md index 6a04a69b1..6b23510c5 100644 --- a/developers/osgi/osgids.md +++ b/developers/osgi/osgids.md @@ -48,7 +48,7 @@ A component requires the following artifacts in a bundle: - An **implementation class** that is specified in the component description. Because we do not write the XML files or the manifest ourselves, we will concentrate on the Java annotations in the examples below. -A component may use different strategies to access the bound services: _Constructor injection_, _Field injection_ or _Method injection_ (see [OSGi Compendium Release 7, Chapter 112.3: References to Services][OSGi-cmpn]). +A component may use different strategies to access the bound services: _Constructor injection_, _Field injection_ or _Method injection_ (see [OSGi Compendium Release 8, Chapter 112.3: References to Services][OSGi-cmpn]). ### Example - Reference a Service @@ -157,7 +157,7 @@ public class MyService { ### Example - Provide a Service -Very often you will have to register a service, that implements an interface defined in the framework (e.g [_EventHandler_](https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/event/EventHandler.html)) or interface, that you have defined. +Very often you will have to register a service, that implements an interface defined in the framework (e.g [_EventHandler_](https://osgi.org/javadoc/osgi.cmpn/8.0.0/org/osgi/service/event/EventHandler.html)) or interface, that you have defined. An interface allows you to change the implementation easily or register multiple implementations in the Service Registry. We will use DS to register an implementation of the EventHandler service in the OSGi Service Registry. @@ -196,7 +196,7 @@ Three type of components are defined: - **delayed** - with ```immediate``` attribute set to ```false```; - **factory** - we will not discuss the lifecycle of this type in this article. -You can find more information in the [OSGi Compendium Release 7, Chapter 112.2: Components][OSGi-cmpn]. +You can find more information in the [OSGi Compendium Release 8, Chapter 112.2: Components][OSGi-cmpn]. ## Component Lifecycle @@ -272,9 +272,9 @@ You might review again the [Equinox commands](equinox.html#iv-commands) before y ## Further Reading -- [OSGi Compendium Release 7][OSGi-cmpn] +- [OSGi Compendium Release 8][OSGi-cmpn] - [Lars Vogel - Declarative services](http://www.vogella.com/tutorials/OSGiServices/article.html#declarativeservices) - [Getting Started with OSGi: Declarative Services](https://www.eclipsezone.com/eclipse/forums/t97690.rhtml) - -[OSGi-cmpn]: https://osgi.org/download/r7/osgi.cmpn-7.0.0.pdf +[OSGi-cmpn]: https://osgi.org/download/r8/osgi.cmpn-8.0.0.pdf