The Template Providers – org.eclipse.smarthome.automation.template.TemplateProvider are responsible for tracking bundle or file resources that contain template Automation ESH objects. The Template Provider service is designed to provide basic functionality that gives access to available templates of the Rule Template Registry. They can be used to:
Get localized template by using method getTemplate(String UID, Locale locale). When the localization is not specified or it is not supported a templates with default locale is returned.
Get all available localized templates by using method getTemplates(Locale locale). When the localization is not specified or it is not supported the templates with default locale are returned.
Registering Bundles
The Providers are packaged in two bundles, one for the Bundle Resource Providers – org.eclipse.smarthome.automation.provider and one for the File Providers – org.eclipse.smarthome.automation.provider.file:
org.eclipse.smarthome.automation.provider declares Bundle Resource Module Type Provider as org.eclipse.smarthome.automation.type.ModuleTypeProvider and Bundle Resource Template Provider as org.eclipse.smarthome.automation.template.TemplateProvider components.
org.eclipse.smarthome.automation.provider.file declares File Module Type Provider as org.eclipse.smarthome.automation.type.ModuleTypeProvider and File Template Provider as org.eclipse.smarthome.automation.template.TemplateProvider components.