Interface MeasurementApi
- All Known Implementing Classes:
MeasurementApiImpl
public interface MeasurementApi
API for creating, deleting and retrieving measurements from the platform.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(MeasurementRepresentation measurement) Creates measurement in the platform.createAsync
(MeasurementRepresentation measurement) 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 measurement) 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 gid) Gets measurement by idGets the all the measurement in the platformGets the measurements from the platform based on specified filter
-
Method Details
-
getMeasurement
Gets measurement by id- Parameters:
gid
- 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
-
create
Creates measurement in the platform. The id of the measurement must not be set, since it will be generated by the platform- Parameters:
measurement
- measurement to be created- Returns:
- the created measurement with the generated id
- Throws:
SDKException
- if the measurement could not be created
-
createWithoutResponse
Creates measurement in the platform. Does not send Accept header to make the request be processed faster.- Parameters:
measurement
- measurement to be created- Throws:
SDKException
- if the measurement could not be created
-
createBulk
MeasurementCollectionRepresentation createBulk(MeasurementCollectionRepresentation measurementCollection) throws SDKException Creates measurements in the platform. The id of the measurements must not be set, since it will be generated by the platform- Parameters:
measurementCollection
- measurements to be created- Returns:
- the created measurements with their generated ids
- Throws:
SDKException
- if the measurements could not be created
-
createBulkWithoutResponse
void createBulkWithoutResponse(MeasurementCollectionRepresentation measurementCollection) throws SDKException Creates measurements in the platform. Does not send Accept header to make the request be processed faster.- Parameters:
measurementCollection
- measurements to be created- Throws:
SDKException
- if the measurements could not be created
-
createAsync
Creates measurement in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.- Parameters:
measurement
- measurement to be created- Returns:
- the created measurement with the generated id
- Throws:
SDKException
- if the measurement could not be created
-
delete
Deletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Parameters:
measurement
- to be deleted- Throws:
SDKException
- if the measurement could not be deleted
-
deleteMeasurementsByFilter
void deleteMeasurementsByFilter(MeasurementFilter filter) throws IllegalArgumentException, SDKException Delete measurements from the platform based on the specified filter- Parameters:
filter
- the filter criteria(s)- Throws:
IllegalArgumentException
- when invalid filter providedSDKException
- if the query failed
-
getMeasurements
Gets the all the measurement in the platform- Returns:
- collection of measurements with paging functionality
- Throws:
SDKException
- if the query failed
-
getMeasurementsByFilter
Gets the measurements from the platform based on specified filter- Parameters:
filter
- the filter criteria(s)- Returns:
- collection of measurements matched by the filter with paging functionality
- Throws:
SDKException
- if the query failed
-
deleteMeasurement
Deprecated.Deletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.- Parameters:
measurement
- to be deleted- Throws:
SDKException
- if the measurement could not be deleted
-