...
|
...
|
@@ -15,7 +15,10 @@ |
15
|
15
|
*/
|
16
|
16
|
package org.thingsboard.server.controller;
|
17
|
17
|
|
|
18
|
+import io.swagger.annotations.ApiOperation;
|
|
19
|
+import io.swagger.annotations.ApiParam;
|
18
|
20
|
import lombok.RequiredArgsConstructor;
|
|
21
|
+import org.springframework.http.MediaType;
|
19
|
22
|
import org.springframework.security.access.prepost.PreAuthorize;
|
20
|
23
|
import org.springframework.web.bind.annotation.RequestMapping;
|
21
|
24
|
import org.springframework.web.bind.annotation.RequestMethod;
|
...
|
...
|
@@ -37,10 +40,13 @@ public class QueueController extends BaseController { |
37
|
40
|
|
38
|
41
|
private final QueueService queueService;
|
39
|
42
|
|
|
43
|
+ @ApiOperation(value = "Get queue names (getTenantQueuesByServiceType)",
|
|
44
|
+ notes = "Returns a set of unique queue names based on service type. " + TENANT_AUTHORITY_PARAGRAPH)
|
40
|
45
|
@PreAuthorize("hasAuthority('TENANT_ADMIN')")
|
41
|
|
- @RequestMapping(value = "/tenant/queues", params = {"serviceType"}, method = RequestMethod.GET)
|
42
|
|
- @ResponseBody
|
43
|
|
- public Set<String> getTenantQueuesByServiceType(@RequestParam String serviceType) throws ThingsboardException {
|
|
46
|
+ @RequestMapping(value = "/tenant/queues", params = {"serviceType"}, produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
|
|
47
|
+ @ResponseBody()
|
|
48
|
+ public Set<String> getTenantQueuesByServiceType(@ApiParam(value = QUEUE_SERVICE_TYPE_DESCRIPTION, allowableValues = QUEUE_SERVICE_TYPE_ALLOWABLE_VALUES)
|
|
49
|
+ @RequestParam String serviceType) throws ThingsboardException {
|
44
|
50
|
checkParameter("serviceType", serviceType);
|
45
|
51
|
try {
|
46
|
52
|
return queueService.getQueuesByServiceType(ServiceType.valueOf(serviceType));
|
...
|
...
|
|