Search in sources :

Example 1 with AdminSettingsUpdateMsg

use of org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg in project thingsboard by thingsboard.

the class AdminSettingsEdgeProcessor method processAdminSettingsToEdge.

public DownlinkMsg processAdminSettingsToEdge(EdgeEvent edgeEvent) {
    AdminSettings adminSettings = mapper.convertValue(edgeEvent.getBody(), AdminSettings.class);
    AdminSettingsUpdateMsg adminSettingsUpdateMsg = adminSettingsMsgConstructor.constructAdminSettingsUpdateMsg(adminSettings);
    return DownlinkMsg.newBuilder().setDownlinkMsgId(EdgeUtils.nextPositiveInt()).addAdminSettingsUpdateMsg(adminSettingsUpdateMsg).build();
}
Also used : AdminSettingsUpdateMsg(org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg) AdminSettings(org.thingsboard.server.common.data.AdminSettings)

Example 2 with AdminSettingsUpdateMsg

use of org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg in project thingsboard by thingsboard.

the class BaseEdgeTest method validateAdminSettings.

private void validateAdminSettings() throws JsonProcessingException {
    List<AdminSettingsUpdateMsg> adminSettingsUpdateMsgs = edgeImitator.findAllMessagesByType(AdminSettingsUpdateMsg.class);
    Assert.assertEquals(4, adminSettingsUpdateMsgs.size());
    for (AdminSettingsUpdateMsg adminSettingsUpdateMsg : adminSettingsUpdateMsgs) {
        if (adminSettingsUpdateMsg.getKey().equals("mail")) {
            validateMailAdminSettings(adminSettingsUpdateMsg);
        }
        if (adminSettingsUpdateMsg.getKey().equals("mailTemplates")) {
            validateMailTemplatesAdminSettings(adminSettingsUpdateMsg);
        }
    }
}
Also used : AdminSettingsUpdateMsg(org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg)

Aggregations

AdminSettingsUpdateMsg (org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg)2 AdminSettings (org.thingsboard.server.common.data.AdminSettings)1