@Controller @RequestMapping(value="/batch") public class BatchOperationsController extends RestController
| Constructor and Description |
|---|
BatchOperationsController() |
| Modifier and Type | Method and Description |
|---|---|
protected com.sitewhere.spi.device.command.IDeviceCommand |
assureDeviceCommand(String token,
javax.servlet.http.HttpServletRequest servletRequest)
Get a device command by unique token.
|
com.sitewhere.spi.device.batch.IBatchOperation |
createBatchCommandByCriteria(com.sitewhere.rest.model.device.request.BatchCommandForCriteriaRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
Create a batch operation that invokes a command for all devices that match the
given criteria.
|
com.sitewhere.spi.device.batch.IBatchOperation |
createBatchCommandInvocation(com.sitewhere.rest.model.device.request.BatchCommandInvocationRequest request,
javax.servlet.http.HttpServletRequest servletRequest) |
com.sitewhere.spi.device.batch.IBatchOperation |
getBatchOperationByToken(String batchToken,
javax.servlet.http.HttpServletRequest servletRequest) |
com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.batch.IBatchElement> |
listBatchOperationElements(String operationToken,
int page,
int pageSize,
javax.servlet.http.HttpServletRequest servletRequest) |
com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.batch.IBatchOperation> |
listBatchOperations(boolean includeDeleted,
int page,
int pageSize,
javax.servlet.http.HttpServletRequest servletRequest) |
com.sitewhere.spi.scheduling.IScheduledJob |
scheduleBatchCommandByCriteria(com.sitewhere.rest.model.device.request.BatchCommandForCriteriaRequest request,
String scheduleToken,
javax.servlet.http.HttpServletRequest servletRequest)
Schedule job that will create a new batch command invocation based on the given
criteria.
|
getTenant, getTenantAuthToken, handleAccessDenied, handleMissingContent, handleRuntimeException, handleSuccessfulAdd, handleSystemException@RequestMapping(value="/{batchToken}",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.batch.IBatchOperation getBatchOperationByToken(@PathVariable
String batchToken,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
@RequestMapping(method=GET) @ResponseBody @Secured(value="ROLE_REST") public com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.batch.IBatchOperation> listBatchOperations(@RequestParam(defaultValue="false") boolean includeDeleted, @RequestParam(required=false,defaultValue="1") int page, @RequestParam(required=false,defaultValue="100") int pageSize, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
@RequestMapping(value="/{operationToken}/elements",
method=GET)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.search.ISearchResults<com.sitewhere.spi.device.batch.IBatchElement> listBatchOperationElements(@PathVariable
String operationToken,
@RequestParam(required=false,defaultValue="1")
int page,
@RequestParam(required=false,defaultValue="100")
int pageSize,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
@RequestMapping(value="/command",
method=POST)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.batch.IBatchOperation createBatchCommandInvocation(@RequestBody
com.sitewhere.rest.model.device.request.BatchCommandInvocationRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
@RequestMapping(value="/command/criteria",
method=POST)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.device.batch.IBatchOperation createBatchCommandByCriteria(@RequestBody
com.sitewhere.rest.model.device.request.BatchCommandForCriteriaRequest request,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
request - servletRequest - com.sitewhere.spi.SiteWhereException@RequestMapping(value="/command/criteria/schedules/{scheduleToken}",
method=POST)
@ResponseBody
@Secured(value="ROLE_REST")
public com.sitewhere.spi.scheduling.IScheduledJob scheduleBatchCommandByCriteria(@RequestBody
com.sitewhere.rest.model.device.request.BatchCommandForCriteriaRequest request,
@PathVariable
String scheduleToken,
javax.servlet.http.HttpServletRequest servletRequest)
throws com.sitewhere.spi.SiteWhereException
request - scheduleToken - servletRequest - com.sitewhere.spi.SiteWhereExceptionprotected com.sitewhere.spi.device.command.IDeviceCommand assureDeviceCommand(String token, javax.servlet.http.HttpServletRequest servletRequest) throws com.sitewhere.spi.SiteWhereException
token - servletRequest - com.sitewhere.spi.SiteWhereExceptionCopyright © 2016 SiteWhere, LLC.. All rights reserved.