Commit Graph

50 Commits

Author SHA1 Message Date
J-N-K
b39f735b9d
[rest] Fix missing backward compatibility in rules/runNow (#3225)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-12 20:48:45 +01:00
J-N-K
6479e4f818
[REST] allow running rules with context (#3160)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-11 00:01:46 +01:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
Wouter Born
9ff7ad43b9
Add more null annotations to automation bundles (#2763)
* Add more null annotations to automation bundles. This adds null annotations to many classes in the automation bundles and a few dimension classes.
* Further cleanup AutomationCommandExport
* Remove null from RuleStatusInfo JavaDocs. This should be clear from how the class is now annotated.
* Validate deserialized RuleStatusInfo
* Allow TriggerHandlerCallback to be triggered without providing a context

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-25 16:40:02 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
Paul Vogel
7e5bf34d9e
RuleResource: Add schema specification for "Location" header (#2421)
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-07-05 23:09:17 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
Sönke Küper
cb36eb57e7
[rest] Added default values for rule simulation start and end dates and restricted the max. duration to < 180 days to prevent an denial-of-service. (#2296)
Fixes #2285 

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-27 21:21:00 +02:00
Sönke Küper
db488d861e
[automation] Added rule rest endpoint and backend operation for rule execution simulation (#2125)
* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-11 09:31:48 +02:00
Wouter Born
b64c84e8b9
Fix wrong/missing OpenAPI ApiResponse content (#2258)
This fixes some issues where the response content is missing or wrong in the generated OpenAPI spec.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-27 13:28:47 +01:00
Wouter Born
07b95ca668
Fix SAT findings (#2256)
Fixes 65 SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:18:08 +01:00
Paul van den Berg
eee30b0c57
Improved error logging when adding rules (#2053)
Improved error logging for adding rules

Signed-off-by: Paul van den Berg <prj.vandenberg@gmail.com>
2021-01-06 23:23:17 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Christoph Hofmann
bbede78dc9
Added operationIds for OpenAPI specification (#1861)
Signed-off-by: Christoph Hofmann <christoph@hofmann.pm>
2020-12-10 23:12:11 +01:00
Yannick Schaus
065177b730
[rest] Add summary option to rules, things, UI components resources (#1827)
The /things, /rules, /ui/components endpoints retrieve all objects
in their entirety, which can become very big, i.e. channels, config
parameters, script rule modules or trees of UI components can
quickly add up to the size.

When the UI simply displays a list of those objects it retrieves all
this extra information but does nothing with it.

This introduces an optional ?summary=true query parameter for the
above resources to limit the output to pre-defined fields which are
deemed most relevant for displaying these lists, omitting the rest.

When the option is not set, the behavior remains unchanged so this
change is not API breaking. The API version has therefore not been
incremented. The client is responsible for adding the option to
retrieve summarized collections instead of the entire objects.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-21 18:40:48 +01:00
Wouter Born
0281c10036
[infrastructure] add external null-annotations (#1775)
Add EEAs and fix null analysis errors.

Related to:

* #888
* openhab/openhab-addons#8848

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 21:33:48 +01:00
Wouter Born
f5f1e32b9f
Add null annotations to ConfigDescriptionRegistry and ConfigUtil (#1641)
Also added "org.eclipse.jdt.annotation" to the test BOM so we can use "org.eclipse.jdt.annotation.Checks" in itests.
That class has many useful methods that help with writing more readable test code when using the Eclipse JDT null analysis annotations.

After running the resolver on the itests  a lot of bundles were removed from the itest.bndrun files.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-15 17:00:15 +02:00
Wouter Born
29dfb967c4
Migrate to OpenAPI 3 annotations (#1576)
* Upgrade to Swagger 2.1.0
* Add missing root and events resources
* Fix wrong and add missing response implementations

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-02 13:21:57 +02:00
Yannick Schaus
aac4ca2f79
Swagger: support injection of ReaderListener, add OAuth2 annotations (#1496)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-07-24 22:30:06 +02:00
Paul Vogel
2adc918409
Change responseContainer from Collection to List (#1555)
In order to change to a valid type since the documentation suggests "Valid values are "List", "Set" or "Map". Any other value will be ignored.".

Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-07-20 18:33:19 +02:00
Paul Vogel
ccde410d6a
Change responseContainer from Collection to List (#1554)
In order to change to a valid type since the documentation suggests "Valid values are "List", "Set" or "Map". Any other value will be ignored.".

Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-07-20 18:31:33 +02:00
Kai Kreuzer
bb81ed27e5
[REST] Added "editable" info to rules in REST API (#1508)
* Added "editable" info to rules in REST API

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-03 08:35:41 +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
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
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
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
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
Yannick Schaus
fe4e276b68
Implementation of a JWT-based OAuth2 flow for the admin API (#1389)
* Initial implementation of a JWT-based OAuth2 flow for the admin API

Implements #1388.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-23 22:36:11 +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
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
59675788e0 Renamed packages
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
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
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
Wouter Born
12e8edc039 Use diamond operator (#1114)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-11 02:29:47 -07:00
Wouter Born
3d52c72a91 Fix SAT AuthorContributionDescriptionCheck findings (#1110)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 11:36:05 +02:00
Wouter Born
12b3c1030f Fix SAT "Initial contribution" warnings (#1100)
Fixes the SAT warning: First javadoc author should have "Initial contribution" contribution description.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-07 21:25:40 -07:00
Wouter Born
cbb96945f0 Ignore and remove Eclipse project specific settings (#677)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-26 13:04:09 +01:00
Wouter Born
48d873a32b Use openHAB license headers (#632)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-06 16:10:00 +01:00
Hilbrand Bouwkamp
d342afbc4e Updated NOTICE files to openHAB (#578)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-02-15 10:46:18 +01:00
Markus Rathgeb
fbca7e806f remove project specific JDT settings (#481)
Done per request by @wborn.
Related to: https://github.com/openhab/openhab-core/pull/476#discussion_r251566034

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-01-29 10:24:39 +01:00
Markus Rathgeb
a37cceab67 mavenize openHAB and integrate mavenized ESH repository (#467)
* mavenize openHAB and integrate mavenized ESH repository

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-01-28 13:07:31 +01:00