* [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>
* 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>
* 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 optional rule UID to DSL file syntax
* avoid notifying the rule registry for isolated models
* check other model files for rule with same name before rule removal
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Also-by: Ravi Nadahar <nadahar@rediffmail.com>
* [DSL rule] Add time of day trigger to DSL file syntax
Closes#5435
Exampele of rule:
```
rule "Test time of day trigger"
when
Time is 20:13
then
logInfo("Rule","Test")
end
```
For backward compatibility, using "noon" and "midnight" is still supported.
"timer.TimeOfDayTrigger" is now used (instead of "timer.GenericCronTrigger").
Here is the log confirming the execution of the rule at the expected time:
```
20:13:00.531 [INFO ] [org.openhab.core.model.script.Rule ] - Test
```
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Upgrade Karaf from 4.4.9 to 4.4.10.
This includes upgrades for the following libraries:
* pax-logging from 2.3.1 to 2.3.2
* xbean from 4.28 to 4.29
Reverts downgrade of karaf-maven-plugin to 4.4.8.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Upgrade Pax Web from 8.0.33 to 8.0.34
* Upgrade Jetty from 9.4.57 to 9.4.58
* Upgrade log4j-api from 2.0.16 to 2.0.17
This was missed when Karaf was upgraded to 4.4.9 in #5195.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Fix test failures in DiscoveryServiceRegistryOSGiTest
Follow-up to #5307. Apply the fix to more test cases.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Initial plan
* Fix Mockito verification failures in DiscoveryServiceRegistryOSGiTest
Add reset(discoveryListenerMock) after addDiscoveryListener() in both testRemoveOlderResultsOnlySameService() and testRemoveOlderResultsOnlyOfSpecificBridge() to clear the mock invocation counter after cached results are replayed.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: holgerfriedrich <2121139+holgerfriedrich@users.noreply.github.com>
Upgrade com.jayway.jsonpath:json-path from 2.9.0 to 2.10.0,
including the following dependencies:
Upgrade net.minidev:accessors-smart and net.minidev:json-smart to from 2.5.0
to 2.6.0. Removes transitive CVE-2024-57699.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Ideally these should be rewritten to avoid relying on setting the defaults, but for now an effort is done to make sure that the initial value is restored after testing, and that
these tests don't run in parallel with other tests.
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Upgrade Karaf to 4.4.9
Upgrade Karaf from 4.4.8 to 4.4.9.
This includes upgrades for the following libraries:
* jetty from 9.4.57.v20241219 to 9.4.58.v20250814
* pax-web from 8.33 to 8.34
* asm from 9.8 to 9.9
* bouncycastle/bcprov from 1.81 to 1.83
* classgraph from 4.8.180 to 4.8.184
* commons-cli from 1.9.0 to 1.10.0
* commons-io from 2.20.0 to 2.21.0
* commons-lang3 from 3.18.0 to 3.20.0
* cxf from 3.6.8 3.6.9
* guava from 33.4.8-jre to 33.5.0-jre
* jackson-annotations from 2.19.2 to 2.20
* jackson from 2.19.2 to 2.20.1
* jna from 5.17.0 to 5.18.1
* ws.xmlschema from 2.3.1 to 2.3.2
* xbean from 4.27 to 4.28
* xtext/xtend from 2.40.0 to 2.41.0
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* DSL Items Parser: Fix incorrect parsing of keywords encountered in the wrong context
When specifying tag names that match one of the valid item types, e.g. `Switch`, the parser incorrectly treated it as a new start of an item definition.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* [REST] New API for conversion between file format and JSON
Related to #4585
This PR supports conversion of things and items.
It supports DSL and YAML file formats.
A first new API (POST /file-format/create) allows to create a file format (DSL or YAML) from a JSON object.
A second new API (POST /file-format/parse) allows to parse a file format (DSL or YAML) to a JSON object.
These 2 APIs should help Main UI displaying DSL and YAML file formats for things.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>