@ -136,7 +137,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Create Or Update Asset (saveAsset)",
notes="Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address) "+
notes="Creates or Updates the Asset. When creating asset, platform generates Asset Id as "+UUID_WIKI_LINK+
"The newly created Asset id will be present in the response. "+
"Specify existing Asset id to update the asset. "+
"Referencing non-existing Asset Id will cause 'Not Found' error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -542,7 +543,7 @@ public class AssetController extends BaseController {
notes="Creates assignment of an existing asset to an instance of The Edge. "+
EDGE_ASSIGN_ASYNC_FIRST_STEP_DESCRIPTION+
"Second, remote edge service will receive a copy of assignment asset "+
EDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION+". "+
EDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION+
"Third, once asset will be delivered to edge service, it's going to be available for usage on remote edge instance.",
produces=MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('TENANT_ADMIN')")
@ -582,7 +583,7 @@ public class AssetController extends BaseController {
notes="Clears assignment of the asset to the edge. "+
EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION+
"Second, remote edge service will receive an 'unassign' command to remove asset "+
EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION+". "+
EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION+
"Third, once 'unassign' command will be delivered to edge service, it's going to remove asset locally.",
protectedstaticfinalStringPAGE_DATA_PARAMETERS="You can specify parameters to filter the results. "+
@ -129,9 +131,9 @@ public class ControllerConstants {
protectedstaticfinalStringEVENT_END_TIME_DESCRIPTION="Timestamp. Events with creation time after it won't be queried.";
protectedstaticfinalStringEDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION="Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. ";
protectedstaticfinalStringEDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform)";
protectedstaticfinalStringEDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). ";
protectedstaticfinalStringEDGE_ASSIGN_ASYNC_FIRST_STEP_DESCRIPTION="Assignment works in async way - first, notification event pushed to edge service queue on platform. ";
protectedstaticfinalStringEDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform)";
protectedstaticfinalStringEDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). ";
@ -166,7 +167,7 @@ public class DeviceController extends BaseController {
}
@ApiOperation(value="Create Or Update Device (saveDevice)",
notes="Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Device. When creating device, platform generates Device Id as "+UUID_WIKI_LINK+
"Device credentials are also generated if not provided in the 'accessToken' request parameter. "+
"The newly created device id will be present in the response. "+
"Specify existing Device id to update the device. "+
@ -203,7 +204,7 @@ public class DeviceController extends BaseController {
}
@ApiOperation(value="Create Device (saveDevice) with credentials ",
notes="Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Device. When creating device, platform generates Device Id as "+UUID_WIKI_LINK+
"Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. "+
"You may find the example of LwM2M device and RPK credentials below: \n\n"+
@ -186,7 +187,7 @@ public class DeviceProfileController extends BaseController {
}
@ApiOperation(value="Create Or Update Device Profile (saveDeviceProfile)",
notes="Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Device Profile. When creating device profile, platform generates device profile id as "+UUID_WIKI_LINK+
"The newly created device profile id will be present in the response. "+
"Specify existing device profile id to update the device profile. "+
"Referencing non-existing device profile Id will cause 'Not Found' error. "+NEW_LINE+
@ -149,7 +150,7 @@ public class EdgeController extends BaseController {
}
@ApiOperation(value="Create Or Update Edge (saveEdge)",
notes="Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Edge. When creating edge, platform generates Edge Id as "+UUID_WIKI_LINK+
"The newly created edge id will be present in the response. "+
"Specify existing Edge id to update the edge. "+
"Referencing non-existing Edge Id will cause 'Not Found' error."+
@ -452,17 +453,17 @@ public class EdgeController extends BaseController {
}
}
@ApiOperation(value="Set root rule chain for provided edge (setRootRuleChain)",
@ApiOperation(value="Set root rule chain for provided edge (setEdgeRootRuleChain)",
notes="Change root rule chain of the edge to the new provided rule chain. \n"+
"This operation will send a notification to update root rule chain on remote edge service."+TENANT_AUTHORITY_PARAGRAPH,
@ -138,7 +139,7 @@ public class OtaPackageController extends BaseController {
}
@ApiOperation(value="Create Or Update OTA Package Info (saveOtaPackageInfo)",
notes="Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as "+UUID_WIKI_LINK+
"The newly created OTA Package id will be present in the response. "+
"Specify existing OTA Package id to update the OTA Package Info. "+
"Referencing non-existing OTA Package Id will cause 'Not Found' error. "+
@ -185,7 +188,7 @@ public class RuleChainController extends BaseController {
}
@ApiOperation(value="Create Or Update Rule Chain (saveRuleChain)",
notes="Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as "+UUID_WIKI_LINK+
"The newly created Rule Chain Id will be present in the response. "+
"Specify existing Rule Chain id to update the rule chain. "+
"Referencing non-existing rule chain Id will cause 'Not Found' error."+
@ -601,7 +604,7 @@ public class RuleChainController extends BaseController {
notes="Creates assignment of an existing rule chain to an instance of The Edge. "+
EDGE_ASSIGN_ASYNC_FIRST_STEP_DESCRIPTION+
"Second, remote edge service will receive a copy of assignment rule chain "+
EDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION+". "+
EDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION+
"Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. "+
"\n\nOnly rule chain with type 'EDGE' can be assigned to edge."+TENANT_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@ -642,7 +645,7 @@ public class RuleChainController extends BaseController {
notes="Clears assignment of the rule chain to the edge. "+
EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION+
"Second, remote edge service will receive an 'unassign' command to remove rule chain "+
EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION+". "+
EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION+
"Third, once 'unassign' command will be delivered to edge service, it's going to remove rule chain locally."+TENANT_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('TENANT_ADMIN')")
@ -677,17 +680,25 @@ public class RuleChainController extends BaseController {
@ -131,7 +132,7 @@ public class TbResourceController extends BaseController {
}
@ApiOperation(value="Create Or Update Resource (saveResource)",
notes="Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Resource. When creating the Resource, platform generates Resource id as "+UUID_WIKI_LINK+
"The newly created Resource id will be present in the response. "+
"Specify existing Resource id to update the Resource. "+
"Referencing non-existing Resource Id will cause 'Not Found' error. "+
@ -111,7 +112,7 @@ public class TenantController extends BaseController {
}
@ApiOperation(value="Create Or update Tenant (saveTenant)",
notes="Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Tenant. When creating tenant, platform generates Tenant Id as "+UUID_WIKI_LINK+
"Default Rule Chain and Device profile are also generated for the new tenants automatically. "+
"The newly created Tenant Id will be present in the response. "+
"Specify existing Tenant Id id to update the Tenant. "+
@ -110,7 +111,7 @@ public class TenantProfileController extends BaseController {
}
@ApiOperation(value="Create Or update Tenant Profile (saveTenantProfile)",
notes="Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as "+UUID_WIKI_LINK+
"The newly created Tenant Profile Id will be present in the response. "+
"Specify existing Tenant Profile Id id to update the Tenant Profile. "+
"Referencing non-existing Tenant Profile Id will cause 'Not Found' error. "+
@ -174,7 +175,7 @@ public class UserController extends BaseController {
}
@ApiOperation(value="Save Or update User (saveUser)",
notes="Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
notes="Create or update the User. When creating user, platform generates User Id as "+UUID_WIKI_LINK+
"The newly created User Id will be present in the response. "+
"Specify existing User Id to update the device. "+
"Referencing non-existing User Id will cause 'Not Found' error."+
@ -78,7 +79,7 @@ public class WidgetTypeController extends BaseController {
@ApiOperation(value="Create Or Update Widget Type (saveWidgetType)",
notes="Create or update the Widget Type. "+WIDGET_TYPE_DESCRIPTION+" "+
"When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"When creating the Widget Type, platform generates Widget Type Id as "+UUID_WIKI_LINK+
"The newly created Widget Type Id will be present in the response. "+
"Specify existing Widget Type id to update the Widget Type. "+
"Referencing non-existing Widget Type Id will cause 'Not Found' error."+
@ -79,7 +80,7 @@ public class WidgetsBundleController extends BaseController {
@ApiOperation(value="Create Or Update Widget Bundle (saveWidgetsBundle)",
notes="Create or update the Widget Bundle. "+WIDGET_BUNDLE_DESCRIPTION+" "+
"When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). "+
"When creating the bundle, platform generates Widget Bundle Id as "+UUID_WIKI_LINK+
"The newly created Widget Bundle Id will be present in the response. "+
"Specify existing Widget Bundle id to update the Widget Bundle. "+
"Referencing non-existing Widget Bundle Id will cause 'Not Found' error."+
super.processBeforeTest("Test Request attribute values from the server proto","Gateway Test Request attribute values from the server proto",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Request attribute values from the server proto","Gateway Test Request attribute values from the server proto",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Request attribute values from the server proto","Gateway Test Request attribute values from the server proto",TransportPayloadType.PROTOBUF,null,null);
super.processBeforeTest("Test Request attribute values from the server proto","Gateway Test Request attribute values from the server proto",TransportPayloadType.PROTOBUF,null,null);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,false);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,true);
super.processBeforeTest("Test Subscribe to attribute updates","Gateway Test Subscribe to attribute updates",TransportPayloadType.PROTOBUF,null,null,true,false);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,false);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
super.processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,true,true);
processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED);
processBeforeTest("RPC test device","RPC test gateway",TransportPayloadType.PROTOBUF,null,null,null,null,null,RPC_REQUEST_PROTO_SCHEMA,null,null,DeviceProfileProvisionType.DISABLED,false,false);
}
@After
@ -93,122 +53,27 @@ public abstract class AbstractMqttServerSideRpcProtoIntegrationTest extends Abst
super.processBeforeTest("Test Post Attributes device","Test Post Attributes gateway",TransportPayloadType.PROTOBUF,null,POST_DATA_ATTRIBUTES_TOPIC,true,false);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,true,false);
@ -87,7 +90,7 @@ public abstract class AbstractMqttTimeseriesProtoIntegrationTest extends Abstrac
" }\n"+
" }\n"+
"}";
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,schemaStr,null,null,null,null,null,DeviceProfileProvisionType.DISABLED);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,schemaStr,null,null,null,null,null,DeviceProfileProvisionType.DISABLED,false,false);
@ -189,7 +192,7 @@ public abstract class AbstractMqttTimeseriesProtoIntegrationTest extends Abstrac
" }\n"+
" }\n"+
"}";
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,schemaStr,null,null,null,null,null,DeviceProfileProvisionType.DISABLED);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,schemaStr,null,null,null,null,null,DeviceProfileProvisionType.DISABLED,false,false);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,null,null,null,null,null,null,null,null,DeviceProfileProvisionType.DISABLED);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,null,null,null,null,null,null,null,null,DeviceProfileProvisionType.DISABLED,false,false);
@ -263,7 +266,7 @@ public abstract class AbstractMqttTimeseriesProtoIntegrationTest extends Abstrac
@Test
publicvoidtestGatewayConnect()throwsException{
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,null,null,null,null,null,null,DeviceProfileProvisionType.DISABLED);
super.processBeforeTest("Test Post Telemetry device proto payload","Test Post Telemetry gateway proto payload",TransportPayloadType.PROTOBUF,POST_DATA_TELEMETRY_TOPIC,null,null,null,null,null,null,null,DeviceProfileProvisionType.DISABLED,false,false);
@ApiModelProperty(position=8,value="Label that may be used in widgets",example="Silo Edge on far field")
publicStringgetLabel(){
returnthis.label;
}
@Override
publicStringgetSearchText(){
returngetName();
}
@ApiModelProperty(position=9,required=true,value="Edge routing key ('username') to authorize on cloud")
publicStringgetRoutingKey(){
returnthis.routingKey;
}
@ApiModelProperty(position=10,required=true,value="Edge secret ('password') to authorize on cloud")
publicStringgetSecret(){
returnthis.secret;
}
@ApiModelProperty(position=11,required=true,value="Edge license key obtained from license portal",example="AgcnI24Z06XC&m6Sxsdgf")
publicStringgetEdgeLicenseKey(){
returnthis.edgeLicenseKey;
}
@ApiModelProperty(position=12,required=true,value="Edge uses this cloud URL to activate and periodically check it's license",example="https://thingsboard.cloud")
"mqtt-enable-compatibility-with-json-payload-format":"Enable compatibility with other payload formats.",
"mqtt-enable-compatibility-with-json-payload-format-hint":"When enabled, the platform will use a Protobuf payload format by default. If parsing fails, the platform will attempt to use JSON payload format. Useful for backward compatibility during firmware updates. For example, the initial release of the firmware uses Json, while the new release uses Protobuf. During the process of firmware update for the fleet of devices, it is required to support both Protobuf and JSON simultaneously. The compatibility mode introduces slight performance degradation, so it is recommended to disable this mode once all devices are updated.",
"mqtt-use-json-format-for-default-downlink-topics":"Use Json format for default downlink topics",
"mqtt-use-json-format-for-default-downlink-topics-hint":"When enabled, the platform will use Json payload format to push attributes and RPC via the following topics: <b>v1/devices/me/attributes/response/$request_id</b>, <b>v1/devices/me/attributes</b>, <b>v1/devices/me/rpc/request/$request_id</b>, <b>v1/devices/me/rpc/response/$request_id</b>. This setting does not impact attribute and rpc subscriptions sent using new (v2) topics: <b>v2/a/res/$request_id</b>, <b>v2/a</b>, <b>v2/r/req/$request_id</b>, <b>v2/r/res/$request_id</b>. Where <b>$request_id</b> is an integer request identifier.",
"snmp-add-mapping":"Add SNMP mapping",
"snmp-mapping-not-configured":"No mapping for OID to timeseries/telemetry configured",
"snmp-timseries-or-attribute-name":"Timeseries/attribute name for mapping",