@Controller @RequestMapping(value="/commands") public class CommandsController extends RestController
| Constructor and Description |
|---|
CommandsController() |
| Modifier and Type | Method and Description |
|---|---|
protected com.sitewhere.spi.device.command.IDeviceCommand |
assertDeviceCommandByToken(String token,
javax.servlet.http.HttpServletRequest servletRequest)
Gets a device command by token and throws an exception if not found.
|
com.sitewhere.spi.device.command.IDeviceCommand |
deleteDeviceCommand(String token,
boolean force,
javax.servlet.http.HttpServletRequest servletRequest)
Delete an existing device command.
|
com.sitewhere.spi.device.command.IDeviceCommand |
getDeviceCommandByToken(String token,
javax.servlet.http.HttpServletRequest servletRequest)
Get a device command by unique token.
|
com.sitewhere.spi.device.command.IDeviceCommand |
updateDeviceCommand(String token,
com.sitewhere.rest.model.device.request.DeviceCommandCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
Update an existing device command.
|
getTenant, getTenantAuthToken, handleAccessDenied, handleMissingContent, handleRuntimeException, handleSuccessfulAdd, handleSystemException@RequestMapping(value="/{token}",
method=PUT)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.command.IDeviceCommand updateDeviceCommand(@PathVariable
String token,
@RequestBody
com.sitewhere.rest.model.device.request.DeviceCommandCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
token - request - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.command.IDeviceCommand getDeviceCommandByToken(@PathVariable
String token,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
hardwareId - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}",
method=DELETE)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.command.IDeviceCommand deleteDeviceCommand(@PathVariable
String token,
@RequestParam(defaultValue="false")
boolean force,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
token - force - com.sitewhere.spi.SiteWhereExceptionprotected com.sitewhere.spi.device.command.IDeviceCommand assertDeviceCommandByToken(String token, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
token - servletRequest - com.sitewhere.spi.SiteWhereExceptionCopyright © 2016 SiteWhere, LLC.. All rights reserved.