@Controller @RequestMapping(value="/specifications") public class SpecificationsController extends RestController
| Constructor and Description |
|---|
SpecificationsController() |
| Modifier and Type | Method and Description |
|---|---|
protected com.sitewhere.spi.device.IDeviceSpecification |
assertDeviceSpecificationByToken(String token,
javax.servlet.http.HttpServletRequest servletRequest)
Gets a device specification by token and throws an exception if not found.
|
com.sitewhere.spi.device.command.IDeviceCommand |
createDeviceCommand(String token,
com.sitewhere.rest.model.device.request.DeviceCommandCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
Create a device specification.
|
com.sitewhere.spi.device.IDeviceSpecification |
createDeviceSpecification(com.sitewhere.rest.model.device.request.DeviceSpecificationCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
Create a device specification.
|
com.sitewhere.spi.device.IDeviceSpecification |
deleteDeviceSpecification(String token,
boolean force,
javax.servlet.http.HttpServletRequest servletRequest)
Delete an existing device specification.
|
com.sitewhere.spi.device.IDeviceSpecification |
getDeviceSpecificationByToken(String token,
boolean includeAsset,
javax.servlet.http.HttpServletRequest servletRequest)
Get a device specification by unique token.
|
String |
getDeviceSpecificationProtoByToken(String token,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse response)
Get a device specification by unique token.
|
org.springframework.http.ResponseEntity<byte[]> |
getDeviceSpecificationProtoFileByToken(String token,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse response)
Get a device specification by unique token.
|
com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.command.IDeviceCommand> |
listDeviceCommands(String token,
boolean includeDeleted,
javax.servlet.http.HttpServletRequest servletRequest) |
com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.command.IDeviceCommandNamespace> |
listDeviceCommandsByNamespace(String token,
boolean includeDeleted,
javax.servlet.http.HttpServletRequest servletRequest)
List commands grouped by namespace.
|
com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.IDeviceSpecification> |
listDeviceSpecifications(boolean includeDeleted,
boolean includeAsset,
int page,
int pageSize,
javax.servlet.http.HttpServletRequest servletRequest)
List device specifications that meet the given criteria.
|
com.sitewhere.spi.device.IDeviceSpecification |
updateDeviceSpecification(String token,
com.sitewhere.rest.model.device.request.DeviceSpecificationCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
Update an existing device specification.
|
getTenant, getTenantAuthToken, handleAccessDenied, handleMissingContent, handleRuntimeException, handleSuccessfulAdd, handleSystemException@RequestMapping(method=POST) @ResponseBody @Secured(value="ROLE_REST") public com.sitewhere.spi.device.IDeviceSpecification createDeviceSpecification(@RequestBody com.sitewhere.rest.model.device.request.DeviceSpecificationCreateRequest request, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
request - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.IDeviceSpecification getDeviceSpecificationByToken(@PathVariable
String token,
@RequestParam(defaultValue="true")
boolean includeAsset,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
hardwareId - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}/proto",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public String getDeviceSpecificationProtoByToken(@PathVariable
String token,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse response)
throws com.sitewhere.spi.SiteWhereException
hardwareId - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}/spec.proto",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public org.springframework.http.ResponseEntity<byte[]> getDeviceSpecificationProtoFileByToken(@PathVariable
String token,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse response)
throws com.sitewhere.spi.SiteWhereException
hardwareId - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}",
method=PUT)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.IDeviceSpecification updateDeviceSpecification(@PathVariable
String token,
@RequestBody
com.sitewhere.rest.model.device.request.DeviceSpecificationCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
token - request - com.sitewhere.spi.SiteWhereException@RequestMapping(method=GET) @ResponseBody @Secured(value="ROLE_REST") public com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.IDeviceSpecification> listDeviceSpecifications(@RequestParam(defaultValue="false") boolean includeDeleted, @RequestParam(defaultValue="true") boolean includeAsset, @RequestParam(required=false,defaultValue="1") int page, @RequestParam(required=false,defaultValue="100") int pageSize, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
includeDeleted - includeAsset - page - pageSize - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}",
method=DELETE)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.IDeviceSpecification deleteDeviceSpecification(@PathVariable
String token,
@RequestParam(defaultValue="false")
boolean force,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
token - force - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}/commands",
method=POST)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.command.IDeviceCommand createDeviceCommand(@PathVariable
String token,
@RequestBody
com.sitewhere.rest.model.device.request.DeviceCommandCreateRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
request - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/{token}/commands",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.command.IDeviceCommand> listDeviceCommands(@PathVariable
String token,
@RequestParam(defaultValue="false")
boolean includeDeleted,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
@RequestMapping(value="/{token}/namespaces",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.command.IDeviceCommandNamespace> listDeviceCommandsByNamespace(@PathVariable
String token,
@RequestParam(defaultValue="false")
boolean includeDeleted,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
token - includeDeleted - com.sitewhere.spi.SiteWhereExceptionprotected com.sitewhere.spi.device.IDeviceSpecification assertDeviceSpecificationByToken(String token, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
token - servletRequest - com.sitewhere.spi.SiteWhereExceptionCopyright © 2016 SiteWhere, LLC.. All rights reserved.