Conditions of a certain type are handled by a common condition provider which creates and retrieves condition objects upon request.
When the Home Automation Manager has to create or retrieve a condition of a certain type, it uses the appropriate condition provider.
The condition provider is also responsible for notifying the Home Automation Manager when all of its conditions are met.
Automation management applications such as the HAM plugin for the Web Console can initialize new conditions through interaction with the Home Automation Manager.
Using Basic Command Provider Implementation
The Home Automation Manager Module offers a ready basic implementation of condition provider. In most cases you can develop a new condition type by extending it. The basic condition provider implementation accomplishes the following tasks:
Implements the methods used by the Home Automation Manager.
Provides a ready-made mechanism for persistent storage of conditions in the Config Tree: Each condition's configuration properties are stored in a special node of the tree. Thus it is possible for the provider class to reconstruct a condition object using only the information from its config node.
Development Tasks
To define a new condition type, execute the following steps:
Create a Condition - Extend the Condition interface, and then implement it.
Implement a Condition Provider - Implement the ConditionProvider interface for creating and retrieving condition objects.