Class MeasurementApiImpl
java.lang.Object
com.cumulocity.sdk.client.measurement.MeasurementApiImpl
- All Implemented Interfaces:
MeasurementApi
-
Constructor Summary
ConstructorsConstructorDescriptionMeasurementApiImpl(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.voidcreateBulkWithoutResponse(MeasurementCollectionRepresentation measurementCollection) Creates measurements in the platform.voidcreateWithoutResponse(MeasurementRepresentation measurementRepresentation) Creates measurement in the platform.voiddelete(MeasurementRepresentation measurement) Deletes measurement from the platform.voiddeleteMeasurement(MeasurementRepresentation measurement) Deprecated.voidDelete 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:MeasurementApiGets measurement by id- Specified by:
getMeasurementin 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:MeasurementApiDeletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Specified by:
deleteMeasurementin interfaceMeasurementApi- Parameters:
measurement- to be deleted- Throws:
SDKException- if the measurement could not be deleted
-
delete
Description copied from interface:MeasurementApiDeletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Specified by:
deletein 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:MeasurementApiDelete measurements from the platform based on the specified filter- Specified by:
deleteMeasurementsByFilterin interfaceMeasurementApi- Parameters:
filter- the filter criteria(s)- Throws:
IllegalArgumentException- when invalid filter providedSDKException- if the query failed
-
getMeasurementsByFilter
Description copied from interface:MeasurementApiGets the measurements from the platform based on specified filter- Specified by:
getMeasurementsByFilterin 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:MeasurementApiGets the all the measurement in the platform- Specified by:
getMeasurementsin 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:MeasurementApiCreates measurement in the platform. The id of the measurement must not be set, since it will be generated by the platform- Specified by:
createin 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:MeasurementApiCreates measurements in the platform. The id of the measurements must not be set, since it will be generated by the platform- Specified by:
createBulkin interfaceMeasurementApi- Parameters:
measurementCollection- measurements to be created- Returns:
- the created measurements with their generated ids
-
createBulkWithoutResponse
Description copied from interface:MeasurementApiCreates measurements in the platform. Does not send Accept header to make the request be processed faster.- Specified by:
createBulkWithoutResponsein interfaceMeasurementApi- Parameters:
measurementCollection- measurements to be created
-
createWithoutResponse
public void createWithoutResponse(MeasurementRepresentation measurementRepresentation) throws SDKException Description copied from interface:MeasurementApiCreates measurement in the platform. Does not send Accept header to make the request be processed faster.- Specified by:
createWithoutResponsein interfaceMeasurementApi- Parameters:
measurementRepresentation- measurement to be created- Throws:
SDKException- if the measurement could not be created
-
createAsync
Description copied from interface:MeasurementApiCreates measurement in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.- Specified by:
createAsyncin 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
-