Commit Graph

172 Commits (6922d60fd99562103f9f67f8b254f932a3d70759)

Author SHA1 Message Date
Wouter Born f00c7700cb
Start license headers with `/*` instead of `/**` (#4544)
Prevents JavaDoc tooling issues because these tools check comments starting with `/**`.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-07 21:48:56 +01:00
Holger Friedrich 40d079ae80
Java 21 language features (#4535)
* Java 21 language features

* use getFirst and getLast methods
* replace new Locale by Locale.of
* replace Paths.get by Path.of
* use ThreadLocalRandom.current().nextDouble()
* add @Serial annotations

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-01-06 23:22:43 +01:00
Wouter Born 979e4a7409
Update license headers to 2025 (#4532)
Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-01 16:40:04 +01:00
jimtng 8b68aa7441
Clean up arguments after executing Script Transformation (#4524)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-12-28 12:28:36 +01:00
Wouter Born db72021460
Update Eclipse files (#4514)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-12-24 07:02:47 +01:00
Holger Friedrich 8d837f9823
Prepare for OH 5.0.0 (#4496)
* Prepare for OH 5.0.0

* Switch to 5.0.0-SNAPSHOT
* Fix spotless after unleash
* resolve itest runbundles
* Fix linux-specific pom

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-15 18:49:23 +01:00
openhab-bot 0f2e56f39d [unleash-maven-plugin] Preparation for next development cycle. 2024-12-15 11:41:19 +00:00
openhab-bot 0c93cc0456
New Crowdin updates (#4480)
* New translations addons.properties (Catalan)
* New translations addons.properties (Czech)
* New translations audio.properties (Catalan)
* New translations automation.properties (Catalan)
* New translations automation.properties (Czech)
* New translations chart.properties (Catalan)
* New translations chart.properties (Czech)
* New translations defaultsystemchannels.properties (Catalan)
* New translations defaultsystemchannels.properties (Czech)
* New translations ephemeris.properties (Catalan)
* New translations firmware.properties (Catalan)
* New translations hli.properties (Catalan)
* New translations i18n.properties (Catalan)
* New translations inbox.properties (Catalan)
* New translations jsonstorage.properties (Catalan)
* New translations jsr223.properties (Catalan)
* New translations jsr223.properties (Czech)
* New translations languagesupport.properties (Catalan)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations lsp.properties (Catalan)
* New translations magic.properties (Catalan)
* New translations marketplace.properties (Catalan)
* New translations messages.properties (Catalan)
* New translations network.properties (Catalan)
* New translations persistence.properties (Catalan)
* New translations restauth.properties (Catalan)
* New translations scriptprofile.properties (Catalan)
* New translations scriptprofile.properties (Czech)
* New translations sitemap.properties (Catalan)
* New translations systemprofiles.properties (Catalan)
* New translations systemprofiles.properties (Czech)
* New translations systemthingstatusinfos.properties (Catalan)
* New translations tags.properties (Catalan)
* New translations units.properties (Catalan)
* New translations units.properties (Czech)
* New translations validation.properties (Catalan)
* New translations validation.properties (Czech)
* New translations voice.properties (Catalan)
* New translations voice.properties (Czech)
2024-12-08 11:45:41 +01:00
Florian Hotze 4eec4a3e45
ScriptProfile: Recover from closed context for JS Scripting (#4437)
Co-authored-by: J-N-K <github@klug.nrw>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-06 21:20:34 +01:00
Florian Hotze 922a2068c0
[automation] Synchronize script action/condition execution if engine implements Lock (#4426)
This moves the locking mechanism added in #4402 to the inheritors of AbstractScriptModuleHandler
to synchronize execution context access as well.

This fixes the problem thathttps://github.com/openhab/openhab-addons/pull/17510 worked around by using Thread.sleep.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-10-26 23:26:20 +02:00
Florian Hotze d012d36bba
[automation] Add support for synchronized execution of compiled scripts (#4402)
* [automation] Synchronize execution of compiled scripts if ScriptEngine implements Lock interface

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-10-06 19:20:30 +02:00
jimtng 3a79871072
Ensure timeseries entries have unique timestamps (#4397)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-10-02 00:07:55 +02:00
jimtng 83b069d970
Revert "Insert context keys before compiling UI scripts (#4372)" (#4373)
This reverts commit 6e6f000800.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-10 07:52:16 +02:00
J-N-K 53889cdcdb
Add a PersistenceService bundle tracker (#4324)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-09-09 20:06:15 +02:00
jimtng 6e6f000800
Insert context keys before compiling UI scripts (#4372)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-09 19:23:57 +02:00
jimtng 72753be8cc
Add time series support for script profile (#4365)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-31 11:49:46 +02:00
jimtng b8e0f94cb0
Add missing ScriptProfile parameter options (#4360)
for commandFromItemScript and stateFromItemScript

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-21 19:42:12 +02:00
Florian Hotze f631f1bbca
[rules] Remove leftover from #4289 (#4319) 2024-07-14 22:28:38 +02:00
jimtng 8cc267afd8
Fix Timer.isRunning() returning true immediately after rescheduling (#4313)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-13 15:10:31 +02:00
Florian Hotze 918b4faa3b
[rules] Add support for pre-compilation of conditions and actions (#4289)
* ScriptConditionHandler/ScriptActionHandler: Add support for pre-compilation of scripts

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-09 19:12:33 +02:00
Kai Kreuzer 21e605d212
Apply spotless after release, resolve bundles (#4301)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-07 23:22:27 +02:00
openhab-bot 07e23eac3c [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 16:05:56 +00:00
openhab-bot 1a33e23fef
New Crowdin updates (#4285)
* New translations validation.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations voice.properties (Dutch)

* New translations automation.properties (Dutch)

* New translations scriptprofile.properties (Dutch)

* New translations units.properties (Dutch)

* New translations systemprofiles.properties (Dutch)

* New translations defaultsystemchannels.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations magic.properties (Dutch)

* New translations jsr223.properties (Dutch)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)
2024-06-30 10:38:54 +02:00
openhab-bot dcc3842386
New Crowdin updates (#4236)
* New translations addons.properties (Hungarian)

* New translations scriptprofile.properties (Hungarian)

* New translations systemprofiles.properties (Hungarian)

* New translations chart.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations magic.properties (Hungarian)

* New translations jsr223.properties (Hungarian)

* New translations defaultsystemchannels.properties (Danish)
2024-05-22 21:27:54 +02:00
Florian Hotze b9940d6687
[automation] Improve logging in ScriptConditionHandler (#4192)
Fixes #4179.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 10:16:03 +02:00
Florian Hotze be9cbf2649
[automation] Avoid memory leak on script loading failure (#4162)
Core part of the fix for https://github.com/openhab/openhab-addons/issues/16462.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 22:32:20 +01:00
Florian Hotze c9ee992047
[automation] Allow empty script for script action & script condition (#4148)
* Script action: Allow script to be empty
* Short evaluate to reasonable defaults when script is empty

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-17 20:31:51 +01:00
openhab-bot 942929973d
New Crowdin updates (#4138)
* New translations addons.properties (French)

* New translations addons.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations units.properties (Finnish)

* New translations scriptprofile.properties (Hebrew)

* New translations units.properties (Hebrew)

* New translations addons.properties (Polish)

* New translations voice.properties (Polish)

* New translations units.properties (Polish)

* New translations addons.properties (Russian)

* New translations marketplace.properties (Russian)

* New translations units.properties (Russian)

* New translations addons.properties (Ukrainian)

* New translations validation.properties (Danish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations addons.properties (Danish)

* New translations scriptprofile.properties (Italian)
2024-03-10 09:41:35 +01:00
Florian Hotze d26aa080ab
Script profile: Fix deprecation warning (#4110)
Refs #4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-02 10:46:28 +01:00
Florian Hotze 6be00bd585
Script profile: Separate toHandlerScript for commands and states (#4058)
* Script profile: Separate toHandlerScript for commands and states

This allows much more fine-grained control for the script profile.
E.g. it is now possible to mimic the behaviour of the `system:follow` profile, but apply a script transformation to the forwarded state.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-06 21:29:19 +01:00
Wouter Born 85056d9d7b
Some more code cleanup (#4021)
This cleanup includes:

* Use enhanced for loops
* Use text blocks
* Use Objects.equals
* Fix some typos
* Remove redundant variable initialization
* Remove redundant null checks with instanceof
* Remove redundant thrown Exceptions
* Remove redundant empty String concatenation

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-04 11:17:55 +01:00
Wouter Born c757819a15
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-04 00:03:48 +01:00
Wouter Born 2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born 6fc7700ea6
Use protected modifier with constructor of abstract classes (#4010)
Abstract classes should not have public constructors.
Constructors of abstract classes can only be called in constructors of their subclasses.
So there is no point in making them public.
The protected modifier should be enough.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 16:17:14 +01:00
Wouter Born 041e3b5127
Remove redundant modifiers (#4000)
Removes redundant modifiers from the code.
These modifiers redeclare the default modifiers that apply to interfaces, enums etc.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 19:29:29 +01:00
Holger Friedrich 839ba1ab4c
Apply spotless after release, resolve bundles (#3953)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:14:28 +01:00
openhab-bot 3b279587b1 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 11:48:43 +00:00
Holger Friedrich 9ad2fef549
Fix javadoc warnings (#3870)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-15 09:21:07 +01:00
J-N-K cdbca4dd0a
Allow sending TimeSeries for items (#3597)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-11-07 20:08:41 -08:00
Wouter Born 783c57cbb9
Use 'uid' instead of 'UID' as method parameters (#3840)
Using 'UID' is confusing as method parameter because it can be mistaken for some kind of constant while reading code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 21:39:47 +02:00
Wouter Born e8e1c9fe73
Simplify code that creates List, Map and Set objects (#3836)
Simplifies the code by using List.of, List.copyOf etc. where possible which results in less code and imports.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 18:00:00 +02:00
Wouter Born 09b3160a55
Simplify code using Stream.toList (#3831)
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 09:20:08 +02:00
openhab-bot dda021ae07
New Crowdin updates (#3807)
* New translations addons.properties (Russian)
* New translations automation.properties (Hebrew)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations scriptprofile.properties (Finnish)
* New translations voice.properties (Finnish)
* New translations voice.properties (Hebrew)
2023-10-02 10:30:39 +02:00
Wouter Born 5daf4ff076
Fix SAT and null analysis issues (#3781)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-27 11:15:15 +02:00
Florian Hotze c4fb71fcc6
[automation] Update texts for rule-based actions (#3733)
Core part of https://github.com/openhab/openhab-webui/issues/1921.

With UI-support for scenes & scripts, the texts (labels, descriptions etc.) for rule-based actions should be updated to mention scenes & scripts as well.
This improves the UI experience.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-30 20:26:51 +02:00
J-N-K 79fd459f59
Fix limitToOptions in script profile (#3730)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-25 09:16:07 +02:00
Kai Kreuzer 5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
openhab-bot fb4f45e3e2
New Crowdin updates (#3653)
* New translations scriptprofile.properties (Hungarian)

* New translations validation.properties (Hungarian)

* New translations automation.properties (Hungarian)

* New translations lsp.properties (German)

* New translations persistence.properties (German)
2023-07-11 18:47:44 +02:00
J-N-K 6a0b268c3e
Fix wrong ready marker in ScriptEngineFactoryBundleTracker (#3683)
* Fix wrong ready marker in ScriptEngineFactoryBundleTracker
* fix ready marker handling

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-06 08:25:13 +02:00