Interface MeasurementApi
-
- All Known Implementing Classes:
MeasurementApiImpl
public interface MeasurementApi
API for creating, deleting and retrieving measurements from the platform.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description MeasurementRepresentation
create(MeasurementRepresentation measurement)
Creates measurement in the platform.Future
createAsync(MeasurementRepresentation measurement)
Creates measurement in the platform.MeasurementCollectionRepresentation
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
deleteMeasurementsByFilter(MeasurementFilter filter)
Delete measurements from the platform based on the specified filterMeasurementRepresentation
getMeasurement(GId gid)
Gets measurement by idMeasurementCollection
getMeasurements()
Gets the all the measurement in the platformMeasurementCollection
getMeasurementsByFilter(MeasurementFilter filter)
Gets the measurements from the platform based on specified filter
-
-
-
Method Detail
-
getMeasurement
MeasurementRepresentation getMeasurement(GId gid) throws SDKException
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
MeasurementRepresentation create(MeasurementRepresentation measurement) throws SDKException
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
void createWithoutResponse(MeasurementRepresentation measurement) throws SDKException
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
Future createAsync(MeasurementRepresentation measurement) throws SDKException
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
void delete(MeasurementRepresentation measurement) throws SDKException
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
MeasurementCollection getMeasurements() throws SDKException
Gets the all the measurement in the platform- Returns:
- collection of measurements with paging functionality
- Throws:
SDKException
- if the query failed
-
getMeasurementsByFilter
MeasurementCollection getMeasurementsByFilter(MeasurementFilter filter) throws SDKException
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 void deleteMeasurement(MeasurementRepresentation measurement) throws SDKException
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
-
-