VoiceManagerImpl activates before the `system:voice` config description is available.
This prevents the defaults from the config description being applied.
IMO ConfigDescriptionRegistry should inherit from the Registry interface and allow for listeners, but that is a larger refactoring and for now I prepare that quick fix.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* New translations languagesupport.properties (Italian)
* New translations voice.properties (Italian)
* New translations tags.properties (French)
* New translations i18n.properties (French)
* New translations messages.properties (French)
* New translations systemprofiles.properties (French)
* New translations languagesupport.properties (French)
* New translations voice.properties (Italian)
* New translations voice.properties (German)
* Add access to various system registries, OSGi instances and the ability to run and enable/disable rules to DSL scripts
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Set required startlevel in ScriptEngineOSGiTest
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Make RuleManager a dynamic reference
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Revert "Set required startlevel in ScriptEngineOSGiTest"
This reverts commit ee8ae1ed198b267c8e2311d9bc025a49be5c8ca9.
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add additional convenience methods
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add more overloads
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Fix socket leak
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Reorganize classes and implement extensions
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Complete reorganization
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add missed JavaDocs
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Fix missed JavaDocs
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Modify implicit imports:
- Remove unnecessary, left-over persistence imports
- Add potentially useful import considering the new stricter class resolution mechanism in the recently bumped Xtext version
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Call existing static methods from RuleExtensions, some further JavaDoc cleanup
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Revise implicit imports
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add TimeZone and Locale to available providers and methods
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Move "helper" classes to existing package with similar content
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Address some review comments
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Remove export of no longer existing package
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Add missing import
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Move common methods to new class Utils and try to get map nullness under control
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Create tests for Rules.java
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Create tests for Items.java
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Create tests for Channels.java
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Create tests for ItemExtensions.java and RuleExtensions.java
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
* Reintroduce warnings and reduce logging flexibility
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
---------
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Co-authored-by: Ravi Nadahar <nadahar@rediffmail.com>
* [voice] Add missing toString implementations to Conversation events
As openHAB logs all events, we need a proper toString implementation, or we end up with this:
```
10:05:03.257 [INFO ] [b.event.ConversationMessageAddedEvent] - org.openhab.core.voice.text.conversation.events.ConversationMessageAddedEvent@dfee3f4c
```
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* [config] ConfigUtil: Add method to apply defaults from `ConfigDescription` to configuration `Map<String, Object>´
This extracts a new override from the existing `ConfigUtil::applyDefaultConfiguration` method.
The existing unit tests for the existing method pass, so this change should be fine.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* Address review
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* Fix typo
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* Update bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigUtil.java
Co-authored-by: Mark Herwege <mherwege@users.noreply.github.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
* Update ConfigUtil.java
Co-authored-by: Mark Herwege <mherwege@users.noreply.github.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Co-authored-by: Mark Herwege <mherwege@users.noreply.github.com>
* Create ready markers for proper managed providers
"managed" markers (managed=item, managed=metadata, managed=rule, managed=thing and managed=itemchannellink) were created too early with the following providers: ScriptedItemProvider, ScriptedMetadataProvider, ScriptedRuleProvider, ScriptedThingProvider and ScriptedItemChannelLinkProvider.
They are now properly created with providers ManagedItemProvider, ManagedMetadataProviderImpl, ManagedRuleProvider, ManagedThingProvider and ManagedItemChannelLinkProvider.
Marker managed=sitemap is now also created with provider UIComponentSitemapProvider.
Marker managed=persistenceserviceconfiguration is now also created with provider ManagedPersistenceServiceConfigurationProvider.
Marker managed=semantictag is now also created with provider ManagedSemanticTagProvider.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Fix tests in core.model.script
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Add semantic tags to conversion REST API
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Copilot comments: first set of changes
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* getAllFromModel: copy list
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* removeModel: get a mutable empty list
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Simplification in method parse (REST API)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Force UTF-8 charset when using the file-format APIs
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Change default value for parameter hideDefaultTags to false
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Add parameter to exclude non editable tags
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Finally apply hideNonEditableTags/hideDefaultTags params even when UIDs are provided
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Review comment: use/add methods isEditable/IsDefault from the registry
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Extend REST API getTags to have the info in the response if the tag is default
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
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>