Commit Graph

982 Commits

Author SHA1 Message Date
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
Yannick Schaus
bd976cf937
REST API: Re-enable auth (#1482)
* Add JAX-RS annotations to auth-related filter & dynamic feature.
* Remove unnecessary Activator.
* Remove BND file.
* Build error responses explicity instead of throwing exceptions in TokenResource to avoid logging.

Fixes #1477

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-05-20 21:54:45 +02:00
Christoph Weitkamp
5e8d7554d8
Avoid UnsupportedEncodingException & use const from StandardCharsets (#1480)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 21:40:49 +02:00
Christoph Weitkamp
0ccf9dfb9c
Removed dependency on 'org.apache.commons.logging (#1440)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 21:35:43 +02:00
Christoph Weitkamp
e2c680916e
Merged o.o.c.automation.module.script.defaultscope.tests into o.o.c.automation.module.script.tests (#1485)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 21:23:20 +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
Christoph Weitkamp
a34eb14668
Simplify lifecycle by using constructor injection (#1479)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-17 19:51:19 +02:00
Christoph Weitkamp
6e407d01e6
Removed INFO logging from ScriptedAutomationManager#removeAll() method (#1478)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-17 19:38:25 +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
Christoph Weitkamp
054ad6c48e
[config] Use field from calling method to check superclass hierarchy for writing fields in 'ConfigMapper' (#1474)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-17 18:02:49 +02:00
Wouter Born
859da2e1c7
Migrate to JAX-RS Whiteboard (#1443)
* Migrate to JAX-RS Whiteboard
* Upgrade Jackson and Swagger TP feature dependencies

The upstream JAX-RS Whiteboard feature is not used because the version ranges currently do not work with Karaf on Windows.
See: https://issues.apache.org/jira/browse/KARAF-6536

* Update Felix logback to 1.0.2

This version adds the jul-to-slf4j bridge (FELIX-6027).
JUL is used by CXF and using the bridge we can use logback to reduce the verbosity of the info logging whenever org.apache.cxf.endpoint.ServerImpl creates endpoints.

* Update Aries Whiteboard to 1.0.8
* Removes the hated default web application (ARIES-1931)
* Improves performance
* Uses CXF 3.2.12
* Don't reuse SSE event builders

SSE event builders are not thread-safe.
It also causes the wrong default values being used.

Also-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-14 22:32:35 +02:00
Wouter Born
583ea02429
Improve SerialPortManager.getIdentifiers() JavaDoc (#1471)
* Improve SerialPortManager.getIdentifiers() JavaDoc

The current JavaDocs do not clearly state that it does not always return all identifiers.
E.g. it will not return any RFC2217 identifiers or undiscovered RXTX port identifiers.
So it should not be used to search for an identifier when the serial port name is known.
This method is useful for listing available port options in UIs and logging.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-13 09:36:27 +02:00
Christoph Weitkamp
178ffdf9c2
Removed some ESH leftovers (#1468)
* Removed ESH leftovers

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-11 08:41:12 +02:00
Wouter Born
ac1f4080e3
Update nrjavaserial in TP to 5.0.2 and define import version range (#1464)
The first version of nrjavaserial with OSGi manifest entries is 3.12.0.
The interface has not changed and is still the same with nrjavaserial 5.x.
So using 3.12.0 as compile time dependency and defining a [3.12,6) version range using bnd.bnd files allows for maximum flexibility.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-08 11:48:06 +02:00
aisebastian
aca4513601
This patch adds more robust value comparison in the rule engine (#1456)
Previously, the state values were compared only if the item state was instanceof DecimalType
which did not work for channels that had a dimension specifier, such as Type:Length. The itemState
instance was of type QuantityType<Quantity<BigDecimal>> and therefore was never compared in the rules

Signed-off-by: Sebastian Irimia <aisebastian@yahoo.com>
2020-05-04 21:58:39 +02:00
Christoph Weitkamp
dbdc0a846b
Added builder for 'ConfigDescriptionParameterGroup' (#1449)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-04 21:55:15 +02:00
Wouter Born
54082a6fc8
Add commons-fileupload back to runtime BOM (#1458)
Fixes resolving bundles in the Demo App.
It's a dependency of org.apache.felix.webconsole

Caused by: #1436

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-04 11:31:48 +02:00
Christoph Weitkamp
30839ac487
[automation] Fixed creation of 'EphemerisConditionHandler' (#1453)
* Fixed creation of EphemerisConditionHandler

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-02 14:08:11 +02:00
jimtng
80207179f2
[timer] Add Timer::isActive() (#1450)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2020-04-28 21:48:02 +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
Wouter Born
ed4b5ff94b
Reconfigure and apply Spotless (#1442)
Adds a configuration for feature.xml files which will be necessary for https://github.com/openhab/static-code-analysis/pull/375

Also applies the results of running Spotless

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-23 17:17:12 +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
Christoph Weitkamp
e17046ea3f
Removed dependency on 'org.apache.commons.httpclient' (#1436)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-20 22:31:46 +02:00
Christoph Weitkamp
a247a021e1
Removed deprecated constructor for 'DiscoveryResultImpl' (#1428)
* Removed deprecated contructor DiscoveryResultImpl
* Added SuppressWarnings('deprecation')
* Removed set default values
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-20 08:47:20 +02:00
Christoph Weitkamp
6b4e54ada3
Removed deprecated 'newItemBuilder' method (#1429)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-19 14:51:21 +02:00
Christoph Weitkamp
7940141421
Simplify lifecycle by using constructor injection (#1431)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-19 14:33:08 +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
9f41a755e3
Fixed failing ChannelTypesI18nTest because of invalid XML (#1427)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-15 12:50:22 +02:00
Wouter Born
66da3a7912
Update nrjavaserial to 3.20.0 (#1426)
Updates nrjavaserial to the official 3.20.0 release (compatible with Java 8/11).
With the upgraded version the library will no longer crash the Java 11 VM on Windows.
The native libraries now use the built in RXTX lockfiles instead of the previously used (OS dependent) liblockdev whereas the OH build didn't use any lockfiles at all.
It also has a fix for errors being printed when scanning for serial ports whenever a serial port is locked (NeuronRobotics/nrjavaserial#166).
With the new version RXTX threads also have proper names and there is a fix for an IllegalMonitorStateException that might occur when closing ports.

Fixes #1384

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-15 11:10:55 +02:00
Wouter Born
b734c2cc04
Remove deprecated TrustManagerProvider (#1425)
* Remove deprecated `TrustManagerProvider`

It was deprecated since the introduction of the `ExtensibleTrustManager` (https://github.com/eclipse/smarthome/pull/6281).

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-15 10:34:45 +02:00
Wouter Born
778c72eabb
Remove deprecated DiscoveryServiceCallback, ExtendedDiscoveryService (#1424)
- Remove deprecated DiscoveryServiceCallback, ExtendedDiscoveryService

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-15 08:23:57 +02:00
Wouter Born
6c85b1bccd
Add and fix more null annotations (#1421)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-15 01:44:37 +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
Wouter Born
017532e2d4
Remove deprecated InboxFilterCriteria (#1417)
- Remove deprecated InboxFilterCriteria

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-09 21:31:23 +02:00
Wouter Born
3e1357f84b
Remove deprecated discovery participant interfaces (#1418)
Removes:
* org.openhab.core.io.transport.mdns.discovery.MDNSDiscoveryParticipant
* org.openhab.core.config.discovery.UpnpDiscoveryParticipant

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-09 21:27:34 +02:00
J-N-K
70b9355d08
[uom] Fix concurrency issue in state update (#1406)
* Fix concurrency issue in state update

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-04-08 19:54:13 +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
Christoph Weitkamp
8955ef9a16
Added nullness annotations to 'ScriptExtensionProvider' (#1411)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-07 08:35:18 +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
Christoph Weitkamp
3cb26ee28a
[storage] Improved JavaDoc (#1409)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-06 08:48:20 +02:00
Christoph Weitkamp
259af7aaef
Fix java.lang.UnsupportedOperationException in StateDescriptionFragmentBuilder (#1405)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-05 17:53:48 +02:00
Christoph Weitkamp
86dc92b6c8
Replace unit placeholder in patterns if updated by DecimalType states (#1404)
* Replace unit placeholder in patterns if updated by DecimalType states

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-05 17:52:30 +02:00
Wouter Born
1f825fc529
Fix null analysis errors in Eclipse (#1403)
Without helping the compiler a bit, it will show null analysis errors in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-04 18:09:44 +02:00
Jonathan Gilbert
c9f1bf6d31
[automation] Add script extension to allow scripts to track their disposal (#1264)
* Added script extension to allow scripts to track their disposal

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-03-27 22:25:10 +01:00
Jonathan Gilbert
caf912bc99
[automation] Added API for ScriptEngineFactory implementations to pull presets (#1256)
* Added API for ScriptEngineFactory implementations to pull presets

Existing API only allows engine factory implementors to request presets are pushed into existing scopes, rather than returning them directory, so that they can be bound into module or library systems. This change allows implementors to capture the presets requested (and potentially ignore any pushed), and therefore expose them via idiomatic import mechanisms for the language being implemented

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-03-27 22:22:04 +01:00
Yannick Schaus
15b3b07614
Add the Karaf jaas feature as runtime prerequisite (#1398)
* Add the Karaf jaas feature as runtime prerequisite
* Remove LoginModule reference from ManagedUserRealm

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-25 12:40:59 +01:00
Yannick Schaus
d8fce0b8b3
Add auth feature to runtime base (#1396)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-24 08:49:52 +01:00