Class MeasurementApiImpl
java.lang.Object
com.cumulocity.sdk.client.measurement.MeasurementApiImpl
- All Implemented Interfaces:
MeasurementApi
-
Constructor Summary
ConstructorDescriptionMeasurementApiImpl
(RestConnector restConnector, UrlProcessor urlProcessor, MeasurementsApiRepresentation measurementsApiRepresentation, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(MeasurementRepresentation measurementRepresentation) Creates measurement in the platform.createAsync
(MeasurementRepresentation measurementRepresentation) Creates measurement in the platform.createBulk
(MeasurementCollectionRepresentation measurementCollection) Creates measurements in the platform.void
createBulkWithoutResponse
(MeasurementCollectionRepresentation measurementCollection) Creates measurements in the platform.void
createWithoutResponse
(MeasurementRepresentation measurementRepresentation) Creates measurement in the platform.void
delete
(MeasurementRepresentation measurement) Deletes measurement from the platform.void
deleteMeasurement
(MeasurementRepresentation measurement) Deprecated.void
Delete measurements from the platform based on the specified filtergetMeasurement
(GId measurementId) Gets measurement by idGets the all the measurement in the platformGets the measurements from the platform based on specified filterprotected String
-
Constructor Details
-
MeasurementApiImpl
public MeasurementApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, MeasurementsApiRepresentation measurementsApiRepresentation, int pageSize)
-
-
Method Details
-
getMeasurement
Description copied from interface:MeasurementApi
Gets measurement by id- Specified by:
getMeasurement
in interfaceMeasurementApi
- Parameters:
measurementId
- id of the measurement to search for- Returns:
- the measurement with the given id
- Throws:
SDKException
- if the measurement is not found or if the query failed
-
deleteMeasurement
@Deprecated public void deleteMeasurement(MeasurementRepresentation measurement) throws SDKException Deprecated.Description copied from interface:MeasurementApi
Deletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Specified by:
deleteMeasurement
in interfaceMeasurementApi
- Parameters:
measurement
- to be deleted- Throws:
SDKException
- if the measurement could not be deleted
-
delete
Description copied from interface:MeasurementApi
Deletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Specified by:
delete
in interfaceMeasurementApi
- Parameters:
measurement
- to be deleted- Throws:
SDKException
- if the measurement could not be deleted
-
deleteMeasurementsByFilter
public void deleteMeasurementsByFilter(MeasurementFilter filter) throws IllegalArgumentException, SDKException Description copied from interface:MeasurementApi
Delete measurements from the platform based on the specified filter- Specified by:
deleteMeasurementsByFilter
in interfaceMeasurementApi
- Parameters:
filter
- the filter criteria(s)- Throws:
IllegalArgumentException
- when invalid filter providedSDKException
- if the query failed
-
getMeasurementsByFilter
Description copied from interface:MeasurementApi
Gets the measurements from the platform based on specified filter- Specified by:
getMeasurementsByFilter
in interfaceMeasurementApi
- Parameters:
filter
- the filter criteria(s)- Returns:
- collection of measurements matched by the filter with paging functionality
- Throws:
SDKException
- if the query failed
-
getMeasurements
Description copied from interface:MeasurementApi
Gets the all the measurement in the platform- Specified by:
getMeasurements
in interfaceMeasurementApi
- Returns:
- collection of measurements with paging functionality
- Throws:
SDKException
- if the query failed
-
create
public MeasurementRepresentation create(MeasurementRepresentation measurementRepresentation) throws SDKException Description copied from interface:MeasurementApi
Creates measurement in the platform. The id of the measurement must not be set, since it will be generated by the platform- Specified by:
create
in interfaceMeasurementApi
- Parameters:
measurementRepresentation
- measurement to be created- Returns:
- the created measurement with the generated id
- Throws:
SDKException
- if the measurement could not be created
-
createBulk
public MeasurementCollectionRepresentation createBulk(MeasurementCollectionRepresentation measurementCollection) Description copied from interface:MeasurementApi
Creates measurements in the platform. The id of the measurements must not be set, since it will be generated by the platform- Specified by:
createBulk
in interfaceMeasurementApi
- Parameters:
measurementCollection
- measurements to be created- Returns:
- the created measurements with their generated ids
-
createBulkWithoutResponse
Description copied from interface:MeasurementApi
Creates measurements in the platform. Does not send Accept header to make the request be processed faster.- Specified by:
createBulkWithoutResponse
in interfaceMeasurementApi
- Parameters:
measurementCollection
- measurements to be created
-
createWithoutResponse
public void createWithoutResponse(MeasurementRepresentation measurementRepresentation) throws SDKException Description copied from interface:MeasurementApi
Creates measurement in the platform. Does not send Accept header to make the request be processed faster.- Specified by:
createWithoutResponse
in interfaceMeasurementApi
- Parameters:
measurementRepresentation
- measurement to be created- Throws:
SDKException
- if the measurement could not be created
-
createAsync
Description copied from interface:MeasurementApi
Creates measurement in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.- Specified by:
createAsync
in interfaceMeasurementApi
- Parameters:
measurementRepresentation
- measurement to be created- Returns:
- the created measurement with the generated id
- Throws:
SDKException
- if the measurement could not be created
-
getSelfUri
- Throws:
SDKException
-