Adding device name url param for device search

merge-requests/7/head
Ace 9 years ago
parent c323b5162e
commit 58666bc4b0

@ -96,6 +96,11 @@ public interface DeviceManagementService {
permissions = {"/permission/admin/device-mgt/admin/devices/list"}
)
Response getDevices(
@ApiParam(
name = "name",
value = "The device name, such as shamu, bullhead or angler.",
required = false)
String name,
@ApiParam(
name = "type",
value = "The device type, such as ios, android or windows.",

@ -62,6 +62,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
@GET
@Override
public Response getDevices(
@QueryParam("name") String name,
@QueryParam("type") String type,
@QueryParam("user") String user,
@QueryParam("roleName") String roleName,
@ -79,6 +80,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
PaginationResult result;
DeviceList devices = new DeviceList();
if(name != null && !name.isEmpty()){
request.setDeviceName(name);
}
if (type != null && !type.isEmpty()) {
request.setDeviceType(type);
}

Loading…
Cancel
Save