Commit Graph

99 Commits

Author SHA1 Message Date
Wouter Born
7300734585
Use "openhab" event topic prefix (#1587)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-11 21:16:49 +02:00
Wouter Born
d3ea6063c0
Migrate to JUnit 5 (#1580)
* Migrates all tests to the JUnit 5 Jupiter API
* Updates bnd to 5.1.2
* Updates maven-surefire-plugin to 3.0.0-M5
* Updates Mockito to 3.4.6
* Updates Hamcrest to 2.2
* Removes org.openhab.core.boot POM dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-09 14:36:46 +02:00
Christoph Weitkamp
419c927587
Enhanced JavaDoc for ChannelBuilder (#1572)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-29 18:14:54 +02:00
Paul Vogel
ed21001891
Cleanup tests: Simplify assertEquals with boolean to assertTrue or assertFalse (#1567)
Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-07-23 22:19:00 +02:00
Christoph Weitkamp
4b77d29f13
Added nullness annotations and constructor injection for ConsoleCommandExtensions (#1549)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-17 21:12:08 +02:00
Christoph Weitkamp
729efeb37a
Improved ThingHandlerService registrations / removals (#1548)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-16 19:11:44 +02:00
J-N-K
558f518feb
Added utility console commnds for removing orphan links (#1395)
* Added utility console commands for removing orphan links

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-07-15 10:30:31 +02:00
Christoph Weitkamp
8808f04c30
Removed dependency on 'org.apache.commons.io' (#1441)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-21 15:17:00 +02:00
Christoph Weitkamp
3eb93bf13a
Removed deprecated constructors and methods from Config API (#1448)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 22:16:54 +02:00
Wouter Born
f3508e4775
Use constructor injection and update null annotations (#1487)
* Use constructor injection and update null annotations

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-20 17:29:18 +02:00
Christoph Weitkamp
3d78cb6df6
[thing] Removed 'getThingByUID()' method from 'BaseBridgeHandler' (#1465)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-17 21:47:58 +02:00
Wouter Born
84d9438737
Add null annotations to REST resources (#1475)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-17 19:32:35 +02:00
Wouter Born
61e17ce39e
Upgrade SAT and Spotless, apply Spotless and enable check (#1446)
* Update SAT and Spotless dependencies
* Apply Spotless and enable check

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-26 11:15:24 +02:00
Christoph Weitkamp
d371a34321
Removed dependency on 'org.apache.commons.lang' (#1433)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-22 14:32:31 +02:00
Wouter Born
92027ca922
Use .equals() on constants and literals to prevent NPEs (#1420)
* Use .equals() on constants and literals to prevent NPEs

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-16 07:40:49 +02:00
Christoph Weitkamp
b770bb1b4a
Removed 'StateDescriptionProvider' interface (#1413)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-14 21:15:29 +02:00
Wouter Born
fb7a7ac421
Add null annotations to providers and ThingManager (#1412)
* Add null annotations to providers and ThingManager

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-11 08:29:12 +02:00
Christoph Weitkamp
aae207bfe9
Removed 'advanced' attribute from 'ChannelGroupType' (#1410)
* Removed 'advanced' attribute from ChannelGroupType

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-07 09:57:28 +02:00
Wouter Born
945afcdb1a
Add and fix more null annotations (#1407)
* Add and fix more null annotations
* Add more @NonNullByDefault and @Nullable annotations
* Remove unnecessary @NonNull annotations
* Fix a few other trivial SAT issues
* Add constructor injection for MDNSDiscoveryService

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-06 10:45:39 +02:00
Christoph Weitkamp
1981e548aa
[thing] Dynamic state/command provider should not return original description (#1399)
* Clarify return values for implementation
* Dynamic state/command provider should not return original descritpion
* Added ERROR log message
* Added integration test for CommandDescriptionProvider

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-06 08:49:26 +02:00
Kai Kreuzer
857679f66b
removed ThingLinkManager and with it the auto-linking feature and "Simple Mode" (#1385)
* removed ThingLinkManager and with it the auto-linking feature and "Simple Mode"

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed feature from REST API as well

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-03 00:23:04 +01:00
silamon
bb3e8694e3
ChannelDTO bugfixes (#1346)
* Fix bug in ChannelDTOMapper
* Add AutoUpdatePolicy to ChannelDTO

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-02-02 21:56:01 +01:00
Michael Reitler (former Michael Dicke)
e7f49dc462
[ThingManagerImpl] Prevent multiple handler inits on thing enabling (#1353)
When a thing is enabled, the `ThingManagerImpl` takes care of calling `ThingHandler#initialize()`.
That makes totally sense if the thing was disabled before. However, if `setEnabled(thingUID, true)` is called for a thing which was already enabled, it causes an additional initialization.
Since concurrent hanlder initializations may cause trouble, it is safer to prevent this. Therefore enabling a thing (including starting its thing handler) should only be performed if the thing is disabled.

Signed-off-by: Michael Reitler <michael.dicke@smail.inf.h-brs.de>
2020-02-02 21:53:25 +01:00
Christoph Weitkamp
8a9d007e0b Added nullness annotations to 'ThingActions' and 'ThingHandlerService' (#1317)
* Minor code improvements; Added nullness annotations to ThingActions and ThingHandlerService
* Revert renaming of 'thingRegistry' property

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-25 16:21:47 +01:00
Christoph Weitkamp
08da8de5cf Moved "ESH-INF/" folders to "OH-INF/" folders (#1328)
* Moved ESH-INF folders to OH-INF folders

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-17 15:29:18 +01:00
Wouter Born
18d0a52d02 Switch to Java 11 and drop Java 8 support (#1305)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-12 22:32:28 +01:00
Christoph Weitkamp
7d42607e4c Streamline format of event outputs (#1318)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-09 12:40:25 +01:00
Christoph Weitkamp
84009652a8 Changed configurationPid prefixes from 'org.openhab.core' ot 'org.openhab' (#1314)
* Changed configurationPid prefixes from 'org.openhab.core' ot 'org.openhab'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-02 09:12:34 +01:00
Wouter Born
3811cb9560 Update copyright headers to 2020 (#1309)
* Update copyright headers to 2020

Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-01 18:06:34 +01:00
Christoph Weitkamp
800956598b Applied spotless formatter (#1302)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-30 22:55:19 +01:00
Christoph Weitkamp
b505847544 Simplify code for 'updateProperty' method (#1300)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-30 09:38:46 +01:00
Christoph Weitkamp
59675788e0 Renamed packages
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 12:18:16 +01:00
Christoph Weitkamp
fca7c215a5 Moved files to new location
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 12:18:16 +01:00
jenkins
bc6a380297 [unleash-maven-plugin] Preparation for next development cycle. 2019-12-15 14:55:36 +00:00
Christoph Weitkamp
e85e1a6f44 Removed dependency on 'org.apache.commons.collections' (#1244)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-28 18:43:10 +01:00
Christoph Weitkamp
0046774eb6 Set UNINITIALIZED -> HANDLER_MISSING_ERROR after enabling a Thing and handler is missing (#1243)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-28 15:55:59 +01:00
Christoph Weitkamp
764b5845a6 [thing] Call removeItem() with item name instead of ThingUID (#1230)
* Added unit test to cover #1226
* Call 'removeItem()' with item name instead of ThingUID
* Added nullness annotations
* Use constructor injection

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-19 17:34:05 +01:00
Christoph Weitkamp
931b2007c5 Removed access to 'BundleContext' from 'BaseThingHandler' (#1214)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-17 21:44:08 +01:00
Wouter Born
403b55c8fc Parameterized logging fixes (#1213)
Make sure Throwables are not be substituted into log messages so they can be formatted according to the logging configuration.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-14 20:08:06 +01:00
Christoph Weitkamp
ce404e0a84 Added German translations for profiles (#1182)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-06 10:45:22 +01:00
Wouter Born
f002a21da5 Fix SAT errors/warnings in resources and tests (#1178)
Fixes SAT errors/warnings in resources and tests reported by SAT 0.8.0-SNAPSHOT.

Related to openhab/static-code-analysis#363

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-03 11:04:19 +01:00
Christoph Weitkamp
1f9a6f685d Consider more than one value when applying the default value(s) for Things and Channels (#1067)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-01 22:23:52 +01:00
Christoph Weitkamp
45602fa184 [xml] Feature thing xml constructor injection (#1167)
* Added contructor injection to thing xml
* Removed Nullable from getChannels and getChannelGroups

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-27 19:24:12 +01:00
Christoph Weitkamp
12d91f7da9 [i18n] Refactoring and annotations (#1161)
* Added nullness annotations to 'RuleTemplateI18nUtil'
* Added nullness annotations to 'ConfigDescriptionGroupI18nUtil'
* Moved 'ConfigDescriptionI18nUtil' into internal package
* Moved 'ConfigDescriptionGroupI18nUtil' into internal package
* Moved 'ThingTypeI18nUtil' into internal package
* Use 'ConfigI18nLocalizationService' instead of 'ConfigDescriptionI18nUtil'
* Use default labels / descriptions if application of localization is not successful
* Resolved itest.bndrun files

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-27 11:17:52 +01:00
Wouter Born
2430256b6a Add null annotations to registries (#1134)
Adds null annotations to all registries, the interfaces they implement and a few other classes.

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-23 07:36:56 +02:00
Wouter Born
be69d2254e Use !isEmpty() instead of "size() > 0" or "size() != 0" (#1155)
* Use !isEmpty() instead of "size() > 0" or "size() != 0"

!isEmpty() expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-21 09:00:52 +02:00
Christoph Weitkamp
22ba5d92c1 Minor profile improvements (#1132)
* Minor code improvements in profile factory
* Added integration test to check if factory creates all available profiles

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-19 15:14:57 +02:00
Christoph Weitkamp
0fdd691c22 Removed superflous resources (#1137)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:28:37 +02:00
Mark Hilbush
8396a17d2d Add system profile for a 'rawbutton-on-off-switch' (#1131)
* Add `rawbutton-on-off-switch` profile and tests

Signed-off-by: Mark Hilbush <mark@hilbush.com>
2019-10-14 22:22:18 +02:00
Christoph Weitkamp
91617d8af8 Fixed POM XML Shema Definition path (#1119)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-12 08:52:16 +02:00