public interface OperationManager
| Modifier and Type | Method and Description |
|---|---|
Activity |
addOperation(Operation operation,
List<DeviceIdentifier> devices)
Method to add a operation to a device or a set of devices.
|
void |
deleteOperation(int operationId) |
List<Activity> |
getActivitiesUpdatedAfter(long timestamp) |
List<Activity> |
getActivitiesUpdatedAfter(long timestamp,
int limit,
int offset) |
int |
getActivityCountUpdatedAfter(long timestamp) |
Operation |
getNextPendingOperation(DeviceIdentifier deviceId) |
NotificationStrategy |
getNotificationStrategy()
retrive the push notification strategy.
|
Operation |
getOperation(int operationId) |
Activity |
getOperationByActivityId(String activity) |
Operation |
getOperationByDeviceAndOperationId(DeviceIdentifier deviceId,
int operationId) |
List<? extends Operation> |
getOperations(DeviceIdentifier deviceId)
Method to retrieve the list of all operations to a device.
|
PaginationResult |
getOperations(DeviceIdentifier deviceId,
PaginationRequest request)
Method to retrieve all the operations applied to a device with pagination support.
|
List<? extends Operation> |
getOperationsByDeviceAndStatus(DeviceIdentifier identifier,
Operation.Status status) |
List<Operation> |
getOperationUpdatedAfter(long timestamp) |
List<? extends Operation> |
getPendingOperations(DeviceIdentifier deviceId)
Method to retrieve the list of available operations to a device.
|
void |
setNotificationStrategy(NotificationStrategy notificationStrategy)
Operation manger implementation can have a push notification stratergy
|
void |
updateOperation(DeviceIdentifier deviceId,
Operation operation) |
Activity addOperation(Operation operation, List<DeviceIdentifier> devices) throws OperationManagementException, InvalidDeviceException
operation - Operation to be addeddevices - List of DeviceIdentifiers to execute the operationOperationManagementException - If some unusual behaviour is observed while adding the operation
InvalidDeviceException If addOperation request contains Invalid DeviceIdentifiers.InvalidDeviceExceptionList<? extends Operation> getOperations(DeviceIdentifier deviceId) throws OperationManagementException
deviceId - OperationManagementException - If some unusual behaviour is observed while fetching the
operation list.PaginationResult getOperations(DeviceIdentifier deviceId, PaginationRequest request) throws OperationManagementException
deviceId - DeviceIdentifier of the devicerequest - PaginationRequest object holding the data for paginationOperationManagementException - If some unusual behaviour is observed while fetching the
operation list.List<? extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException
deviceId - DeviceIdentifier of the deviceOperationManagementException - If some unusual behaviour is observed while fetching the
operation list.Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException
OperationManagementExceptionvoid updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException
OperationManagementExceptionvoid deleteOperation(int operationId)
throws OperationManagementException
OperationManagementExceptionOperation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId) throws OperationManagementException
OperationManagementExceptionList<? extends Operation> getOperationsByDeviceAndStatus(DeviceIdentifier identifier, Operation.Status status) throws OperationManagementException, DeviceManagementException
Operation getOperation(int operationId) throws OperationManagementException
OperationManagementExceptionActivity getOperationByActivityId(String activity) throws OperationManagementException
OperationManagementExceptionList<Operation> getOperationUpdatedAfter(long timestamp) throws OperationManagementException
OperationManagementExceptionList<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException
OperationManagementExceptionList<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementException
OperationManagementExceptionint getActivityCountUpdatedAfter(long timestamp)
throws OperationManagementException
OperationManagementExceptionvoid setNotificationStrategy(NotificationStrategy notificationStrategy)
notificationStrategy - eg: mqtt/xmppNotificationStrategy getNotificationStrategy()
Copyright © 2017 WSO2. All rights reserved.