Search in sources :

Example 1 with PersistenceModel

use of org.openhab.core.model.persistence.persistence.PersistenceModel in project openhab-core by openhab.

the class PersistenceModelManager method addModel.

private void addModel(String modelName) {
    final PersistenceModel model = (PersistenceModel) modelRepository.getModel(modelName);
    if (model != null) {
        String serviceName = serviceName(modelName);
        manager.addConfig(serviceName, new PersistenceServiceConfiguration(mapConfigs(model.getConfigs()), mapStrategies(model.getDefaults()), mapStrategies(model.getStrategies())));
    }
}
Also used : PersistenceModel(org.openhab.core.model.persistence.persistence.PersistenceModel) PersistenceServiceConfiguration(org.openhab.core.persistence.PersistenceServiceConfiguration)

Aggregations

PersistenceModel (org.openhab.core.model.persistence.persistence.PersistenceModel)1 PersistenceServiceConfiguration (org.openhab.core.persistence.PersistenceServiceConfiguration)1