Commit Graph

47 Commits

Author SHA1 Message Date
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
Gaël L'hopital
4fef0100cb [ephemeris] Evolutions of the Ephemeris module (#1169)
* Evolutions of the Ephemeris module

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-11-04 21:50:43 +01:00
Wouter Born
f002a21da5 Fix SAT errors/warnings in resources and tests (#1178)
Fixes SAT errors/warnings in resources and tests reported by SAT 0.8.0-SNAPSHOT.

Related to openhab/static-code-analysis#363

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-03 11:04:19 +01:00
Christoph Weitkamp
1f9a6f685d Consider more than one value when applying the default value(s) for Things and Channels (#1067)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-01 22:23:52 +01:00
Christoph Weitkamp
12d91f7da9 [i18n] Refactoring and annotations (#1161)
* Added nullness annotations to 'RuleTemplateI18nUtil'
* Added nullness annotations to 'ConfigDescriptionGroupI18nUtil'
* Moved 'ConfigDescriptionI18nUtil' into internal package
* Moved 'ConfigDescriptionGroupI18nUtil' into internal package
* Moved 'ThingTypeI18nUtil' into internal package
* Use 'ConfigI18nLocalizationService' instead of 'ConfigDescriptionI18nUtil'
* Use default labels / descriptions if application of localization is not successful
* Resolved itest.bndrun files

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-27 11:17:52 +01:00
Hilbrand Bouwkamp
d39b6bd35b [automation] Fix typos in EphemerisConditions.json (#1164)
Closes #1163

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-10-24 20:37:24 +02:00
Feras Almannaa
144fc8b56f [automation] Fix the created cron to run only once at the trigger minute. (#1162)
Fixes #1156

Signed-off-by: Feras AlManna <firas.almanna3@gmail.com>
2019-10-23 18:11:42 +02: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
Wouter Born
be69d2254e Use !isEmpty() instead of "size() > 0" or "size() != 0" (#1155)
* Use !isEmpty() instead of "size() > 0" or "size() != 0"

!isEmpty() expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-21 09:00:52 +02:00
Christoph Weitkamp
a3d91bebfc [automation] Added EphemerisConditions for NGRE (#915)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-20 01:37:56 +02:00
Wouter Born
4895977966 Use isEmpty() instead of "size() == 0" (#1151)
isEmpty() expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-20 01:27:11 +02:00
Christoph Weitkamp
21744d22b1 Normalized instantiation of loggers (#1138)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:29:27 +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
4e10e0d116 Fix SAT JavadocMethodStyleCheck findings (#1109)
* Fix SAT JavadocMethodStyleCheck findings

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 14:18:54 +02: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
90005e4a56 Fix NoEmptyLineSeparatorCheck and NewlineAtEndOfFileCheck SAT findings (#1108)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-08 22:19:54 -07:00
Wouter Born
08a1f9a86d Fix SAT constant/variable name findings (#1106)
Fixes wrong names identified by the following rules:

* ConstantNameCheck
* LocalFinalVariableNameCheck
* LocalVariableNameCheck
* StaticVariableNameCheck

Most mismatches identified by the MemberNameCheck have also been fixed except for those where the variables are used in events/DTOs etc which would cause issues.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-08 22:19:00 -07: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
9ae7bbe2e8 Move remaining unit tests (#1095)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-04 21:35:13 -07:00
Wouter Born
9d2f09936d Fix null annotations order and cleanup (#958)
* Move null annotations between modifiers and variable type
* Remove redundant public modifiers from interfaces where applicable
* Remove redundant `@NonNull` annotations

Signed-off-by: Wouter Born <github@maindrain.net>
2019-08-08 09:42:30 +02:00
Markus Rathgeb
ef05b4d878 start with an upper case on "initial contribution" (#931)
Related to: https://github.com/openhab/openhab-core/pull/916/#discussion_r305082016

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-07-21 12:24:58 +02:00
Christoph Weitkamp
4b7eddf16e [automation] Fixed topic (#922)
- Fixed topic for `ThingStatusTriggerHandler`. Is is called "things", not "thing".

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-12 21:01:42 +02:00
Christoph Weitkamp
17c756513a [automation] Added 'ThingStatusTrigger' for NGRE (#911)
* Added ThingStatusTrigger for NGRE

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-10 11:57:54 +02:00
Christoph Weitkamp
abab07dfb9 [automation] Added nullness annotations (#910)
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-08 10:53:25 +02:00
Markus Rathgeb
ebda4b8fc7 handle nullness in unget handler of composite module correctly (#878)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-20 21:22:22 +02:00
Markus Rathgeb
f1dfb553c7 we don't know if the rule has been deleted async. (#877)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-20 21:21:41 +02:00
Markus Rathgeb
457df1e853 rule engine should not depend on specific registry implementation (#819)
The current rule registry implementation provides a configuration for
the "rule reinitialization delay". That configuration is not used by the
rule registry itself but used by the rule engine implementation.
This required the rule engine implementation to contain a special code
path that checks if the injected rule registry is an instance of that
special implementation to access that configuration parameter.
As the configuration is not used by the registry itself, it does not
make sense that it is a configuration of that component.
If the rule engine (at least this special implementation) would like to
use a configurable parameter, it should be part of that specific
component implementation.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 23:03:05 +02:00
Markus Rathgeb
1996f69e6f [automation] Fix activation of rules (#796)
Related to: https://github.com/openhab/openhab-core/issues/722
Related to: https://github.com/openhab/openhab-core/issues/783

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-08 15:18:21 +02:00
Markus Rathgeb
52c2456461 [automation] Disabled storage must not be null anymore (#797)
Related to: https://github.com/openhab/openhab-core/pull/787

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-06 13:32:15 +02:00
Markus Rathgeb
eaaf01a5fd use mandatory storage services (#787)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-02 21:11:00 +02:00
Markus Rathgeb
bafc39f91b automation: some cleanup (#776)
* automation: first cleanup
* automation: do not set all enabled rules to idle state

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-01 23:04:07 +02:00
Markus Rathgeb
1ac2e8978b automation: remove specific handling for CompositeModuleHandlerFactory (#764)
The member variable "compositeFactory" that holds the
"CompositeModuleHandlerFactory" instance is set in the activation method
by calling the constructor of of "CompositeModuleHandlerFactory".
This reference is destroyed and unset in the deactivate method.

There exists DS managed multiple optional references to
"ModuleHandlerFactory".
The "add" logic does not touch the "compositeFactory" variable.
The "remove" logic checks if the given service reference is a
"CompositeModuleHandlerFactory" and unsets the "compositeFactory" member
variable.

If e.g. a module handler factory is injected that also implements the
CompositeModuleHandlerFactory the CompositeModuleHandlerFactory created
by the activate method is still be used. If that specific module handler
factory is removed again, the variable "compositeFactory" is unset and
there is NO CompositeModuleHandlerFactory present anymore.

There are two options:
* The instance created in the activate method should be used as long as
  no other one is injected.
* The instance created in the activate method should be used all the
  time.

The whole code base does not contain another specific implementation for
CompositeModuleHandlerFactory, so there is no (at least in openHAB Core)
change that a CompositeModuleHandlerFactory is injected.

So instead of adding a non deterministic usage of "some" composite
module handler factory (which will require a fix of the "set module
handler factory method" and some others), let's drop the buggy code in
the "remove module handler factory" and use the manually created
composite module handler factory all the time.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-28 16:19:06 +02: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
Markus Rathgeb
fdb23778dc improve nullness of events (#657)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-03-15 09:10:52 +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
David Gräff
4c9a5aa291 [Automation] GenericCronTrigger (#622)
A cron trigger module is actually not that "Generic" and a useful trigger type for a lot of rules.

Therefore I suggest to remove the visibility "HIDDEN" with this PR.
I have also added a context "cronexpression" to the TEXT configuration value, so that UI's can offer a cron expression
selection widget.
(we currently have: 'time','item','script','channel','dayOfWeek','rule')

Signed-off-by: davidgraeff <david.graeff@web.de>
2019-03-05 06:46:48 +01:00
David Gräff
eacb019e39 [Automation] DayOfWeekCondition (#621)
Remove inconsistent visibility "PUBLIC". This value is not documented (there is only HIDDEN and VISIBLE) and this is the only module type that uses PUBLIC instead of just not setting this value at all.

Signed-off-by: davidgraeff <david.graeff@web.de>
2019-03-04 11:19:47 +01:00
Hilbrand Bouwkamp
09e2292a58 Replaces 'Eclipse SmartHome' with 'openHAB' in text (#581)
Adapted CONTRIBUTING.md file.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-02-15 10:46:37 +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
David Gräff
ee466da9bc [automation] Unify types - itemsActions (#579)
Unify types - Second try
See also types in automation/moduletypes/ItemTriggers.json

Signed-off-by: davidgraeff <david.graeff@web.de>
2019-02-15 09:31:11 +00:00
Markus Rathgeb
223a371628 update Maven project settings (Eclipse IDE)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-06 15:56:00 +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