@ -34,6 +35,7 @@ public class ControllerConstants {
protectedstaticfinalStringDASHBOARD_ID_PARAM_DESCRIPTION="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringRPC_ID_PARAM_DESCRIPTION="A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringDEVICE_ID_PARAM_DESCRIPTION="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringPROTOCOL_PARAM_DESCRIPTION="A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'";
protectedstaticfinalStringENTITY_VIEW_ID_PARAM_DESCRIPTION="A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringDEVICE_PROFILE_ID_PARAM_DESCRIPTION="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
@ -207,42 +209,222 @@ public class ControllerConstants {
protectedstaticfinalStringIS_BOOTSTRAP_SERVER_PARAM_DESCRIPTION="A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ";
protectedstaticfinalStringFILTER_VALUE_TYPE=NEW_LINE+"## Value Type and Operations"+NEW_LINE+
@ -254,7 +436,7 @@ public class ControllerConstants {
" * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n"+
" * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n";
@ApiOperation(value="Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)",notes="Download server certificate.")
"- Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: \n\n"+
"Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n"+
"Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. "+
"Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. "+
"The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'."+TENANT_AUTHORITY_PARAGRAPH)
notes="During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\n"+
"Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\n"+
"Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\n"+
"The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\n"+
"You may find the example of device with different type of credentials below: \n\n"+
"- Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: \n\n"+
"- Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: \n\n"+
"Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n"+
publicstaticfinalStringEDGE_SECURITY_CHECK="If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. "+
@ -497,13 +503,13 @@ public class EdgeController extends BaseController {
@ApiOperation(value="Get latest time-series value (getLatestTimeseries)",
@ -462,7 +462,9 @@ public class TelemetryController extends BaseController {
notes="Delete time-series for selected entity based on entity id, entity type and keys."+
" Use 'deleteAllDataForKeys' to delete all time-series data."+
" Use 'startTs' and 'endTs' to specify time-range instead. "+
" Use 'rewriteLatestIfDeleted' to rewrite latest value (stored in separate table for performance) after deletion of the time range. "+
" Use 'deleteLatest' to delete latest value (stored in separate table for performance) if the value's timestamp matches the time-range. "+
" Use 'rewriteLatestIfDeleted' to rewrite latest value (stored in separate table for performance) if the value's timestamp matches the time-range and 'deleteLatest' param is true."+
" The replacement value will be fetched from the 'time-series' table, and its timestamp will be the most recent one before the defined time-range. "+
TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(value={
@ -486,14 +488,16 @@ public class TelemetryController extends BaseController {
@ApiParam(value="If the parameter is set to true, the latest telemetry can be removed, otherwise, in case that parameter is set to false the latest value will not removed.")
@ApiParam(value="If the parameter is set to true, the latest telemetry will be rewritten in case that current latest value was removed, otherwise, in case that parameter is set to false the new latest value will not set.")
log.error("RuleNode [{}] has version {} but does not implement TbVersionedNode interface! Any update procedures for this rule node will be skipped!",clazzName,annotation.version());
@ -744,6 +744,22 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService
}catch(Exceptione){
}
}
try{
conn.createStatement().execute("ALTER TABLE component_descriptor ADD COLUMN IF NOT EXISTS configuration_version int DEFAULT 0;");
}catch(Exceptione){
}
try{
conn.createStatement().execute("ALTER TABLE rule_node ADD COLUMN IF NOT EXISTS configuration_version int DEFAULT 0;");
}catch(Exceptione){
}
try{
conn.createStatement().execute("CREATE INDEX IF NOT EXISTS idx_rule_node_type_configuration_version ON rule_node(type, configuration_version);");
}catch(Exceptione){
}
try{
conn.createStatement().execute("CREATE INDEX IF NOT EXISTS idx_notification_recipient_id_unread ON notification(recipient_id) WHERE status <> 'READ';");
}catch(Exceptione){
}
conn.createStatement().execute("UPDATE tb_schema_settings SET schema_version = 3005002;");