The DSL Rule provider must handle rules and scripts in onReadyMarkerAdded.
Until now, only .rules files were handled, not .script files.
As a result, .script files were ignored by the rule provider.
Sometimes it worked well because there was a call to reloadAllModelsOfType for all scripts when the rule provider was ready and the .script files were then handled by the provider in modelChanged.
If this last call was done while the rule provider was not yet ready, the .script files were ignored because the rule provider was not yet setup to handle model changes.
So all of this depends on timing conditions at openHAB startup.
With that change, the .script files will always be considered by the DSL rule provider.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Avoid having a thing handler being initialized for a thing UID without first disposing the previous handler for this thing UID.
unregisterAndDisposeHandler is now called instead of unregisterHandler before calling registerAndInitializeHandler in this particular case (thing handler exists for the old thing version).
Fix#5575
Few logs added to help future debugging.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [DSL Rule] Allow rule with no trigger in DSL file format
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Copilot review comment: call getByytes with StandardCharsets.UTF_8 as parameter
It was already called with StandardCharsets.UTF_8 for certain tests in that test class.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Fix order of lines in itests after resolving conflict
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Make triggers optional including the "when" key
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Align with how it is implemented for any other registry/providers.
YAML files containing sitemaps are now properly loaded.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Updates org.apache.xbean:xbean-bundleutils from 4.29 to 4.30
* Updates org.apache.xbean:xbean-finder from 4.29 to 4.30
Follow-up to #5510.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Upgrade Eclipse Equinox dependencies
* Upgrade org.eclipse.equinox.metatype from 1.6.400 to 1.6.900
* Upgrade org.eclipse.equinox.event from 1.6.300 to 1.7.300
* Upgrade org.eclipse.equinox.log.stream from 1.1.200 to 1.2.100
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* resolve
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
---------
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Upgrade logback-classic from 1.5.27 to 1.5.32
* Upgrade logback-core from 1.5.27 to 1.5.32
This aligns with pax web 2.3.3 used in Karaf 4.4.11.
Follow-up to 5510.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* New translations tags.properties (Italian)
* New translations voice.properties (Italian)
* New translations magic.properties (Italian)
* New translations messages.properties (Italian)
* New translations automation.properties (Italian)
* Add wildcard support for ChannelEventTriggerHandler
* Fix event matching on wildcard channel and add relevant tests
* Add negative match test for wildcard filter
* Check against null and blank channelUID configuration
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* Upgrade Karaf dependencies and libraries
Upgrade Karaf-related dependencies and several libraries.
This includes upgrades for the following libraries:
* jackson from 2.21.1 to 2.21.2
* pax-logging from 2.3.2 to 2.3.3
* org.eclipse.osgi from 3.18.0 to 3.24.0
* org.apache.felix.scr from 2.2.6 to 2.2.18
* org.ow2.asm from 9.9 to 9.9.1
* org.apache.groovy:groovy-all from 5.0.5 to 5.0.25
* org.eclipse.equinox.common from 3.19.0 to 3.20.300
* org.eclipse.equinox.registry from 3.12.0 to 3.12.600
* bndtools/biz.aQute.tester.junit-platform from 7.2.1 to 7.2.3
* org.ops4j.pax.logging.pax-logging-api from 2.3.2 to 2.3.3
* xtext/xtend requirements from 2.41.0 to 2.43.0.M1
* lsp4j from 0.24.0 to 1.0.0
* commons-io from 2.21.0 to 2.22.0
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Add a validity check for the rule UID
A valid rule UID must consist of one or several segments separated by a colon, each segment must only contain alphanumeric, underscore or hyphen, and must not contain any other symbols.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Apply UID validation to YAML rules
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Alternatives
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Implement RulesValidator in Java instead
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Workaround to let specific errors fail rule parsing while others are just a warning
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Alternative way to express model validation expression
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Enforce rule UID in RuleRegistry
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Apply my preferred alternative
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Address review feedback
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add tests for RuleUtil
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Address review comments
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Co-authored-by: Laurent Garnier <lg.hc@free.fr>
Co-authored-by: Ravi Nadahar <nadahar@rediffmail.com>
* Accept any number of sub-widgets in a sitemap frame/page
The previous limit was 100.
Widget id coding is enhanced to support any size.
Old coding is still supported.
Closes#5434
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Simplify how is built the widget id (no need to retry)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>