Commit Graph

366 Commits

Author SHA1 Message Date
Markus Rathgeb
9018e9ae80 move event logging for better analyze options (#856)
* move event logging for better analyze options
* add another optional event handling logging

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-09 10:33:42 +02:00
Christoph Weitkamp
1f20e8277a model: Use constructor injection to simplify lifecycle (#857)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-09 10:33:22 +02:00
Wouter Born
b99c439d77 Fix Jetty warnings by excluding weak cipher suites (#858)
Newer Jetty versions log warnings when weak cipher suites are configured.
This occurs when using Karaf 4.2.6 with Jetty 9.4.18.v20190429.

See also: https://github.com/eclipse/jetty.project/pull/3050

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-09 10:32:46 +02:00
Christoph Weitkamp
306165dcfb Added 'RefreshType.REFRESH' and 'BinaryPrefix' to imports (#854)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-05 13:41:33 +02:00
Christoph Weitkamp
edd148f3f6 automation: Refactoring of 'DefaultScriptScopeProvider' (#851)
* automation: Use constructor injection to simplify lifecycle
* Refactoring of 'DefaultScriptScopeProvider' class

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 20:47:22 +02:00
Christoph Weitkamp
5d7a19541f model: Refactoring of 'RuleEngineImpl' (#853)
* Refactoring of 'RuleEngineImpl'
* Use 'EventType' type instead of the FQCN

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 16:11:18 +02:00
Christoph Weitkamp
e2e53cb5c2 Fixed JavaDoc to get rid of the Quartz includes (#852)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 14:49:09 +02:00
Christoph Weitkamp
64a466ff7d Added nullness annotations (#850)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 14:05:33 +02:00
Christoph Weitkamp
7f0d61d6a6 thing: Use constructor injection to simplify lifecycle (#849)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 13:14:41 +02:00
Christoph Weitkamp
59ffc98b23 model: Use constructor injection to simplify lifecycle (#840)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-02 15:55:53 +02:00
Markus Rathgeb
e9418cb4c1 split between activation logic (#836)
If a component should be activated an instance is constructed and that
object is activated.
Let's split the construction and activation logic also if constructor
injection is used.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-28 21:36:33 +02:00
Christoph Weitkamp
eef779e91a Added nullness annotations (#837)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:56:48 +02:00
Christoph Weitkamp
3ab9bab2f4 rest/sse: Use constructor injection to simplify lifecycle (#838)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:46:20 +02:00
Christoph Weitkamp
8b59505145 discovery: use constructor injection to simplify lifecycle (#835)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-27 22:47:03 +02:00
maniac103
36ae91856c Always send correct 'item' member in SSE events (#691)
* Make sure to always send the correct 'item' member in SSE events.

If a change to item A causes visibility changes to item B, we previously
sent an SSE event for B including the new visibility for B, but included
item and state of A. This leads to client confusion, as it'll update its
internal state for the widget belonging to B with the item state of A.
Make sure to always send the item for B and to omit state in that case.

Closes #690

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2019-05-25 10:12:11 +02:00
Christoph Weitkamp
0d736a700e Use correct profile builder (#831)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-24 19:41:55 +02:00
J-N-K
d35665c201 partly reverts #795 as it creates runtime exceptions (#828)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2019-05-19 18:18:44 +02:00
Markus Rathgeb
c547414003 set http context ID for smarthome HTTP context (#818)
The Pax Web Extender is much more happy if this property is present.
Let's make it happy...

Fixes: https://github.com/openhab/openhab-distro/issues/891

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-18 00:25:38 +02:00
Markus Rathgeb
7780d0d133 Travis CI: check POM convention (#795)
* Travis CI: check POM convention

We could use Travis CI to execute some checks in front of the normal
build.

This change adds a check if the POM files follow our POM conventions.

If something fails, it show which files violates the convention and the
command that should be executed to fix the situation.

For example if the base POM file breaks the convention:

    At least one POM file breaks the convention, please use sortpom to fix the POM file(s).
    	modified:   pom.xml
    You should run the following command in the root directory of your working copy:
        mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines=true -Dsort.createBackupFile=false -Dsort.predefinedSortOrder=recommended_2008_06

* add sortpom plugin to verify phase
* do not use dependency reduced pom (use scope)

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-18 00:07:14 +02:00
Markus Rathgeb
0aaad726ff persistent inbox: ensure all members have been set before usage (#826)
Fixes #823

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-16 14:20:50 +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
ccd66f1491 use constructor injection to simplify lifecycle (#822)
Fixes #811

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 20:05:22 +02:00
Markus Rathgeb
d55d59d3b5 MQTT: disable https hostname verification (#820)
After the bump of Paho from 1.2.0 to 1.2.1 the library enables the https
hostname verification.
This breaks compatibility with current consumers.
Connections cannot be established anymore.

We disable the https hostname verification to keep the old behaviour.
We should add an API so the hostname verification can be enabled if
desired.

This also makes the version 1.2.1 the lower version limit as we need to
use the API to disable the verification internally.

Related to: https://github.com/openhab/openhab-core/issues/815

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-15 17:57:49 +02:00
Markus Rathgeb
dc5ddba83c [model] don't require to download antlr generator on build time (#810)
The antlr generator has been downloaded by a specific download maven
plugin at build time.
Instead of calling the plugin goals it would be much simpler to add the
downloaded file to the repository (I assume it has been not possible on
the Eclipse repository before).
Another benefit would be the IDE integration as the IDE does not need to
know if the plugin needs to be executed or not...

The provided antlr generator has been taken from:
http://download.itemis.com/antlr-generator-3.2.0-patch.jar

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-14 09:04:35 +02:00
Markus Rathgeb
4480e04137 persistent inbox: do not use incomplete initialized object (#813)
Fixes: https://github.com/openhab/openhab-core/issues/812

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-10 09:00:41 +02:00
Christoph Weitkamp
0f74348f51 Factored out 'LocalizedKey' into separate class (#808)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 11:57:40 +02:00
Markus Rathgeb
bba6df5372 add printf for console (#793)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-09 08:29:56 +02:00
Christoph Weitkamp
2a9485bc3b Improvements for 'DefaultSystemChannelTypeProvider' (#807)
* Use constructor dependency injection
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 07:51:56 +02:00
Christoph Weitkamp
b5f33d341d Added i18n feature for profiles (#785)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 07:50:55 +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
Kai Kreuzer
9f4ad2880f removed classpath entries of non-existent folders in order to solve compilation errors in IDE (#806)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-05-07 23:29:07 +02:00
Markus Rathgeb
d19ee33be9 [audio] audio servlet: don't change map while used by interation (#801)
We should not remove entries (so keys) from the map while we are using
the key set (a view) of that map (see JavaDoc: otherwise "results of the
iteration undefined").

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-07 21:26:04 +02:00
Christoph Weitkamp
81423aa22e Separate i18n infrastructure for 'ChannelGroup' (#804)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-07 19:32:11 +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
b7b5dfc9fa POM Code Convention (#790)
There is a recommended ordering for all Maven POM files.
See: https://maven.apache.org/developers/conventions/code.html

The POM files has been "fixed" by using the "sortpom-maven-plugin".
The blank lines has been kept to keep the element separation for
readability.
The plugin also fixes indentation etc.
Have a look at: https://github.com/Ekryd/sortpom/wiki

The profile has been set to "recommended_2008_06" that states:
The POM Code Convention that was chosen by Maven developers in 2008

Command that has been executed:

    mvn \
      com.github.ekryd.sortpom:sortpom-maven-plugin:sort \
      -Dsort.keepBlankLines=true \
      -Dsort.predefinedSortOrder=recommended_2008_06

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-05 17:47:41 +02:00
Markus Rathgeb
83e6962244 add human readable notation of serial protocol type (#794)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-05 17:42:06 +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
f881ef87f1 model: prevent simultan access of singleton (#773)
The singleton instance of "Diagnostician" is used without
synchronization.
The singleton "Diasnostician" instance is using the singleton
"EValidator.Registry" instance (without synchronization).
In very rare high load situations there has been CME detected.

My first "solution" has been to synchronize the access of
Diagnostician's instance method by using

```java
synchronized (Diagnostician.INSTANCE) {
    ...
```

But after realize that EMF is using internally other singletons I tried
to find any information about EMF and thread safety.

I found this one: https://javahacks.net/2016/07/13/emf-thread-safety/

  EMF models are not thread-safe by default and writing multithreaded
  applications is not that simple.
  The more complex our application became, the more often we got
  concurrent modification exceptions and had problems with filtering and
  sorting operations.

So, I assume instead of adding synchronizations to our code that is
using EMF (IIRC this has been already done on the ESH hosted code base
long time ago) we should try to execute EMF code in a safe manner.

This implementation adds a "SafeEMF" OSGi service that should be used to
execute EMF code to ensure none code of EMF (or at least the ones that
calls has been migrated to the SafeEMF usage) is accessed by separate
threads at the same time.

Related to: https://github.com/openhab/openhab-core/issues/772

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-01 23:19:07 +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
Christoph Weitkamp
8d5d789371 Changed ordering of annotation and quialifier
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-30 13:22:26 +02:00
Christoph Weitkamp
5888c8b5d6 Added RawButtonToggleRollershutterProfile, RawRockerStopMoveProfile and RawRockerUpDownProfile
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-30 13:22:26 +02:00
Christoph Weitkamp
b8de327e15 Added i18n feature for dynamic command descriptions (#771)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:16:47 +02:00
Christoph Weitkamp
31760bf3a7 Updated xml schema locations to openhab (#769)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:15:24 +02:00
Christoph Weitkamp
92e58ebfd1 Updated xml schema definition locations to openhab (#768)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:14:51 +02:00
Christoph Weitkamp
76387f2b79 Changed visibility of lists to allow subclasses to acces them (#770)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:10:07 +02:00
Christoph Weitkamp
1bbf250d1f Removed deprecated methods (#721)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-28 18:52:16 +02:00
Markus Rathgeb
25d7f14dfc safe caller: respect classloader of the class and the interfaces (#763)
Related to: https://github.com/openhab/openhab2-addons/issues/5519

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-28 16:20:53 +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
Christoph Weitkamp
bc91446ae1 Added i18n feature for dynamic state descriptions (#655)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-26 12:54:40 +02:00
Christoph Weitkamp
d0800c902e Added RawButtonTogglePlayerProfile, RawRockerNextPreviousProfile and RawRockerRewindFastforwardProfile (#747)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-26 12:53:16 +02:00
Markus Rathgeb
ce72e1083f drop blocking async SSE implementation (#754)
There workaround for a servlet implementation lower then 3 can be removed.
After we migrated from ESH to openHAB Core we could set servlet >= 3 as a requirement.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-25 20:05:22 +02:00
Christoph Weitkamp
387b439509 Reduced logging level in AbstractRegistry (#755)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-25 15:10:33 +02:00
Markus Rathgeb
e92cdace3c REST SSE: disable compression also if servlet 3 support is present (#752)
We should disable the compression regardless if servlet 3 is used or
not. It does not matter which servlet version is used, the client should
receive the messages as soon as possible without compression or
buffering.
You can identify the lost SSE feature as soon as you enable the usage of
Jetty's GzipHandler.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-24 17:03:48 +02:00
Christoph Weitkamp
89da305fd3 Import SmartHomeUnits in Script Scope (#745)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-18 21:45:33 +02:00
Scott Rushworth
77992e7df6 Sort by filename instead of path (#724)
Currently, the scripts are loaded based on the lexicographical order of
the absolute paths of the scripts. This makes it difficult to control
the load order. This change bases the load order solely on the filename,
as was originally used before
https://github.com/eclipse/smarthome/pull/3855, and preserves the
ability to use scripts with the same filename.

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-04-18 20:15:50 +02:00
Gaël L'hopital
20ee4b8fe0 Added change and update timestamp profiles (#732)
* Added change and update timestamp profiles

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-04-18 12:59:15 +02:00
Wouter Born
f4348cd6e8 Attach source JARs without forking to fix Jenkins warnings (#741)
This fixes the following warnings on Jenkins builds:

[WARNING] Failed to getClass for org.apache.maven.plugins.source.SourceJarMojo

See also: https://issues.jenkins-ci.org/browse/JENKINS-27372

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-17 06:55:41 +02:00
Wouter Born
fb972f385a Configure LanguageServer exit behavior (#742)
Xtext 2.17 allows for configuring the LanguageServer exit behavior so the SecurityManager workaround can be removed.

Fixes: https://github.com/eclipse/smarthome/issues/6291
Undos: https://github.com/openhab/openhab-core/pull/409

See also:
* "Configurable Server Exit Behavior" in the Xtext 2.16.0 release notes:
  https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2018/12/04/version-2-16-0
* https://github.com/eclipse/xtext-core/issues/885

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-17 06:52:42 +02:00
Markus Rathgeb
32845ef36d differ between min. karaf version (OSGi) und karaf compilation tooling (#740)
Related to: https://github.com/openhab/openhab-core/pull/723#issuecomment-483595667

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-16 22:41:27 +02:00
David Gräff
8819eb6ef9 add default constructor to MetadataKey (Gson deserialization support) (#727)
Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-15 15:42:46 +02:00
Christoph Weitkamp
309a1af45f Deprecated method - could be removed because of superflous code (#720)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-15 14:35:48 +02:00
Christoph Weitkamp
0aa7661764 Revert ThingImpl and BridgeImpl changes as the storage uses those implementations (#719)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-14 23:09:09 +02:00
Kai Kreuzer
48ce8357f5 remove build path entries for non-existent folders (#716)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-04-14 09:55:32 +02:00
Scott Rushworth
5f880e1062 Added ScriptModuleTypeProvider (#635)
Added ScriptModuleTypeProvider, which dynamically adds available script
languages to the ParameterOptions used in Paper UI when configuring a
ScriptAction or ScriptCondition.

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-04-11 06:57:39 +02:00
Christoph Weitkamp
48a97c1ac2 Improved thing / bridge performance (#693)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-10 08:50:04 +02:00
Markus Rathgeb
33cfb5dbac mapdb storage: minor cleanups (#707)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-09 21:23:25 +02:00
Thomas Weißschuh
82b7ff6db9 Channel groups should not require static channels (#696)
* channel groups should not require static channels
* Added unit tests

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2019-04-08 21:44:52 +02:00
David Gräff
7838a6a46f Update Metadata.java (#704)
Fixes #699 

Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-08 21:07:33 +02:00
Hilbrand Bouwkamp
1d8b7be59b Added units kvarh and kvar. (#695)
Also simplified gravity unit.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-07 11:12:06 +02:00
Gaël L'hopital
c6a9085a74 Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) (#681)
* Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) to UoM

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-03-30 21:43:15 +01:00
Scott Rushworth
d1a343d8b2 Add DynamicImport-Package for scripted automation (#663)
Fixes #610

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-03-30 19:55:01 +01: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
1acb9c8ff2 [core] Increase DateTimeType parsing and formatting precision (#668)
Since Java 9 (JDK-8164428) the maximum resolution from the underlying clock is used.
Instead of just milliseconds the resolution can now even be tenth of microseconds.

According to the Type JavaDocs toFullString() should return the full string representation of the type to be consumed by 'valueOf(String)'.

With the changes in this PR toFullString() may return higher resolution date time strings on newer Java versions and valueOf(value) is able to parse these.

Code depending on a certain resolution returned by toFullString() should use the format(pattern) method instead so the resolution will not change.

Fixes #667

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-17 13:18:30 +01:00
Wouter Born
7e94df1656 Print message instead of null on console when specified play volume is invalid (#670)
The fix helps users and also ensures the unit test works on both Java 8 and 11.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-17 13:00:35 +01:00
Wouter Born
2c7ca348ef Upgrade Xtext to 2.17 for full Java 11 support (#650)
* Upgrade Xtext to 2.17 for full Java 11 support

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-15 09:13:24 +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
Michael Riess
797a78e718 fix synchronisation and equals() in Configuration (#642)
Signed-off-by: Michael Riess <michael.riess@telekom.de>
2019-03-11 21:23:32 +01:00
Markus Rathgeb
2913d75e56 remove PDE left overs from core.karaf project (#639)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-03-08 23:22:00 +01:00
Andre Fuechsel
00edae4539 Do not use Paths to concatenate resource paths as on Windows it will convert "/" to "\\" and this is not a valid resource path for bundle.getResource() (#633)
Signed-off-by: Andre <afuechsel@gmail.com>
2019-03-06 21:32:45 +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
e508e8e4af ConfigDescriptionParameter: javadoc getContext() (#623)
Improve javadoc by explaining the different defined context values. 
I have added "rule", "channel", "channeltype" and "cronexpression" as those are used within the automation module.
The i18n service uses "location" as context value and expects a map to be rendered.

Signed-off-by: davidgraeff <david.graeff@web.de>
2019-03-05 12:59:08 +01:00
Markus Rathgeb
bf4eac7d78 migrate tests for storage.json (#624)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-03-05 11:53:02 +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
Kai Kreuzer
2d92336d72 added Guava version constraint
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-03-04 09:08:09 +01:00
Kai Kreuzer
227707c67a made package imports explicit
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-03-04 09:08:09 +01:00
Hilbrand Bouwkamp
caa9b71c21 Added new parent class for units to fix import problems. (#618)
The change with unit classes parent (#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-03-02 14:26:01 +01:00
Hilbrand Bouwkamp
4517f3959b Added standard gravity and dBm units.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-03-01 23:50:13 +00:00
Hilbrand Bouwkamp
21bf4d9ef0 Reordered units alphabetical, changed extends on SmartHomeUnits
The classes ImperialUnits and SIUnits both extended SmartHomeUnits. But the classes are used a singletons.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-03-01 23:50:13 +00:00
Markus Rathgeb
45858f2dd2 model.core: respect OSGi lifecycle (#592)
Fixes: https://github.com/openhab/openhab-core/issues/591

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-21 10:13:54 +01:00
Gaël L'hopital
32bee0e22c Small UoM evolutions (#588)
Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-02-20 09:41:29 +00:00
Kai Kreuzer
fb0470c6d1 removed dashboard bundle as it has moved to https://github.com/openhab/openhab-webui (#586)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-02-20 05:37:41 +00: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
e9a3701417 migrate tests for model.thing
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-14 14:22:33 +01:00
Markus Rathgeb
fa8a368873 handle different possible service PID types (#560)
* handle different possible service PID types

The property value "service.pid" can use different types:
* String
* String[]
* Collection of String

Only "String" has been supported.

https://github.com/openhab/openhab-core/pull/557 adds support for
String[]

https://github.com/openhab/openhab-core/pull/559 removes the support for
String[] again and adds support for the Collection type List only.

This commit ensures that String arrays and every collection type is
supported, regardless which (valid) type is used by the OSGi framework
implementation.

Fixes: https://github.com/eclipse/smarthome/issues/6710

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-13 17:09:32 +01:00
Markus Rathgeb
afd1770da2 ensure rules can access joda time packages (#572)
Fixes: https://github.com/openhab/openhab-core/issues/553

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-13 09:29:53 +01:00
Markus Rathgeb
04bbd2e847 remove obsolete plugin configuration (#573)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-02-13 09:26:27 +01:00
Henning Treu
3c8e3efa93 Extend ChannelType by command options (#540)
This addresses https://github.com/eclipse/smarthome/issues/5099 by adding a command description with command options along with the state description.
Command options will give a hint to UIs about the specific commands a channel provides. Command options could be rendered as a drop down and also represent the current state or rendered as push buttons to simply send a command to the ThingHandler.
The infrstructure basically copies the StateDescription infrastructure with CommandDescriptionProviders and an `DynamicCommandDescriptionProvider` interface for bindings to hook in and provide dynamic command options.

Signed-off-by: Henning Treu <henning.treu@googlemail.com>
2019-02-12 13:41:01 +00:00