Class MqttDataSource
java.lang.Object
energy.eddie.aiida.models.datasource.DataSource
energy.eddie.aiida.models.datasource.mqtt.MqttDataSource
- Direct Known Subclasses:
CimDataSource,InboundDataSource,MicroTeleinfoV3DataSource,OesterreichsEnergieDataSource,ShellyDataSource,SinapsiAlfaDataSource,SmartGatewaysDataSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MqttAccessControlEntryprotected Stringprotected Stringstatic final Stringprotected static final Stringprotected MqttUserFields inherited from class energy.eddie.aiida.models.datasource.DataSource
asset, countryCode, enabled, icon, id, image, name, permissions, type, userId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(MqttConfiguration config, org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder encoder, String plaintextPassword) protected voidThis method creates the Access Control Entry for a MQTT data source using the ID of the data source.protected voidpassword()protected voidtopic()protected StringThis method formats the topic to correctly display it to the user in the UI.voidupdatePassword(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder encoder, String plaintextPassword) username()Methods inherited from class energy.eddie.aiida.models.datasource.DataSource
asset, countryCode, createFromDto, enabled, icon, id, image, name, permissions, setEnabled, setImage, type, update, userId
-
Field Details
-
TABLE_NAME
- See Also:
-
TOPIC_PREFIX
- See Also:
-
internalHost
-
externalHost
-
user
-
accessControlEntry
-
-
Constructor Details
-
MqttDataSource
protected MqttDataSource() -
MqttDataSource
-
-
Method Details
-
internalHost
-
topic
-
username
-
password
-
configure
public void configure(MqttConfiguration config, org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder encoder, String plaintextPassword) -
updatePassword
public void updatePassword(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder encoder, String plaintextPassword) -
postPersist
protected void postPersist() -
createMqttUser
protected void createMqttUser() -
createAccessControlEntry
protected void createAccessControlEntry()This method creates the Access Control Entry for a MQTT data source using the ID of the data source. This is the default behaviour of a MQTT data source. -
topicFormattedForUi
This method formats the topic to correctly display it to the user in the UI. This topic can then be copied by the user without making any changes to it.- Returns:
- The topic formatted for the UI
-