com.cumulocity.sdk.client.devicecontrol
Class DeviceControlApiImpl

java.lang.Object
  extended by com.cumulocity.sdk.client.devicecontrol.DeviceControlApiImpl
All Implemented Interfaces:
DeviceControlApi

public class DeviceControlApiImpl
extends Object
implements DeviceControlApi


Constructor Summary
DeviceControlApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformApiUrl)
          Deprecated. 
DeviceControlApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformApiUrl, int pageSize)
           
 
Method Summary
 OperationRepresentation create(OperationRepresentation operation)
          Creates operation in the platform.
 OperationRepresentation getOperation(GId gid)
          Gets operation by id
 PagedCollectionResource<OperationCollectionRepresentation> getOperations()
          Gets the all the operation in the platform
 PagedCollectionResource<OperationCollectionRepresentation> getOperationsByFilter(OperationFilter filter)
          Gets the operations from the platform based on specified filter.
 OperationRepresentation update(OperationRepresentation operation)
          Updates operation in the platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceControlApiImpl

@Deprecated
public DeviceControlApiImpl(RestConnector restConnector,
                                       TemplateUrlParser templateUrlParser,
                                       String platformApiUrl)
Deprecated. 


DeviceControlApiImpl

public DeviceControlApiImpl(RestConnector restConnector,
                            TemplateUrlParser templateUrlParser,
                            String platformApiUrl,
                            int pageSize)
Method Detail

getOperation

public OperationRepresentation getOperation(GId gid)
                                     throws SDKException
Description copied from interface: DeviceControlApi
Gets operation by id

Specified by:
getOperation in interface DeviceControlApi
Parameters:
gid - id of the operation to search for
Returns:
the operation with the given id
Throws:
SDKException - if the operation is not found or if the query failed

getOperations

public PagedCollectionResource<OperationCollectionRepresentation> getOperations()
                                                                         throws SDKException
Description copied from interface: DeviceControlApi
Gets the all the operation in the platform

Specified by:
getOperations in interface DeviceControlApi
Returns:
collection of operations with paging functionality
Throws:
SDKException - if the query failed

create

public OperationRepresentation create(OperationRepresentation operation)
                               throws SDKException
Description copied from interface: DeviceControlApi
Creates operation in the platform. The id of the operation must not be set, since it will be generated by the platform

Specified by:
create in interface DeviceControlApi
Parameters:
operation - operation to be created
Returns:
the created operation with the generated id
Throws:
SDKException - if the operation could not be created

update

public OperationRepresentation update(OperationRepresentation operation)
                               throws SDKException
Description copied from interface: DeviceControlApi
Updates operation in the platform. The operation to be updated is identified by the id within the given operation.

Specified by:
update in interface DeviceControlApi
Parameters:
operation - to be updated
Returns:
the updated operation
Throws:
SDKException - if the operation could not be updated

getOperationsByFilter

public PagedCollectionResource<OperationCollectionRepresentation> getOperationsByFilter(OperationFilter filter)
                                                                                 throws SDKException
Description copied from interface: DeviceControlApi
Gets the operations from the platform based on specified filter. Queris based on [status, deviceId, agentId] and [deviceId, agentId] are not supported. currently not supported.

Specified by:
getOperationsByFilter in interface DeviceControlApi
Parameters:
filter - the filter criteria(s)
Returns:
collection of operations matched by the filter with paging functionality
Throws:
SDKException - if the query failed


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.