Package org.openhab.core.thing
Class ManagedThingProvider
java.lang.Object
org.openhab.core.common.registry.AbstractProvider<E>
org.openhab.core.common.registry.AbstractManagedProvider<Thing,ThingUID,org.openhab.core.thing.internal.ThingStorageEntity>
  
org.openhab.core.thing.ManagedThingProvider
- All Implemented Interfaces:
- ManagedProvider<Thing,,- ThingUID> - Provider<Thing>,- ThingProvider
@NonNullByDefault
public class ManagedThingProvider
extends AbstractManagedProvider<Thing,ThingUID,org.openhab.core.thing.internal.ThingStorageEntity>
implements ThingProvider  
ManagedThingProvider is an OSGi service, that allows to add or remove
 things at runtime by calling AbstractManagedProvider.add(E) or
 AbstractManagedProvider.remove(K). An added thing is
 automatically exposed to the ThingRegistry.- Author:
- Oliver Libutzki - Initial contribution, Dennis Nobel - Integrated Storage, Michael Grammling - Added dynamic configuration update
- 
Field SummaryFields inherited from class org.openhab.core.common.registry.AbstractManagedProviderloggerFields inherited from class org.openhab.core.common.registry.AbstractProviderlisteners
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringReturns the name of storage, that is used to persist the elements.protected StringkeyToString(ThingUID key) Transforms the key into a string representation.protected @Nullable ThingConverts the persistable element into the original element.protected org.openhab.core.thing.internal.ThingStorageEntitytoPersistableElement(Thing element) Converts the original element into an element that can be persisted.Methods inherited from class org.openhab.core.common.registry.AbstractManagedProvideradd, get, getAll, remove, updateMethods inherited from class org.openhab.core.common.registry.AbstractProvideraddProviderChangeListener, notifyListenersAboutAddedElement, notifyListenersAboutRemovedElement, notifyListenersAboutUpdatedElement, removeProviderChangeListenerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openhab.core.common.registry.ProvideraddProviderChangeListener, getAll, removeProviderChangeListener
- 
Constructor Details- 
ManagedThingProvider
 
- 
- 
Method Details- 
getStorageNameDescription copied from class:AbstractManagedProviderReturns the name of storage, that is used to persist the elements.- Specified by:
- getStorageNamein class- AbstractManagedProvider<Thing,- ThingUID, - org.openhab.core.thing.internal.ThingStorageEntity> 
- Returns:
- name of the storage
 
- 
keyToStringDescription copied from class:AbstractManagedProviderTransforms the key into a string representation.- Specified by:
- keyToStringin class- AbstractManagedProvider<Thing,- ThingUID, - org.openhab.core.thing.internal.ThingStorageEntity> 
- Parameters:
- key- key
- Returns:
- string representation of the key
 
- 
toElementprotected @Nullable Thing toElement(String key, org.openhab.core.thing.internal.ThingStorageEntity persistableElement) Description copied from class:AbstractManagedProviderConverts the persistable element into the original element.- Specified by:
- toElementin class- AbstractManagedProvider<Thing,- ThingUID, - org.openhab.core.thing.internal.ThingStorageEntity> 
- Parameters:
- key- key
- persistableElement- persistable element
- Returns:
- original element
 
- 
toPersistableElementDescription copied from class:AbstractManagedProviderConverts the original element into an element that can be persisted.- Specified by:
- toPersistableElementin class- AbstractManagedProvider<Thing,- ThingUID, - org.openhab.core.thing.internal.ThingStorageEntity> 
- Parameters:
- element- original element
- Returns:
- persistable element
 
 
-