public class MeasurementApiImpl extends Object implements MeasurementApi
Constructor and Description |
---|
MeasurementApiImpl(RestConnector restConnector,
UrlProcessor urlProcessor,
MeasurementsApiRepresentation measurementsApiRepresentation,
int pageSize) |
Modifier and Type | Method and Description |
---|---|
MeasurementRepresentation |
create(MeasurementRepresentation measurementRepresentation)
Creates measurement in the platform.
|
Future |
createAsync(MeasurementRepresentation measurementRepresentation)
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 measurementRepresentation)
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 filter
|
MeasurementRepresentation |
getMeasurement(com.cumulocity.model.idtype.GId measurementId)
Gets measurement by id
|
MeasurementCollection |
getMeasurements()
Gets the all the measurement in the platform
|
MeasurementCollection |
getMeasurementsByFilter(MeasurementFilter filter)
Gets the measurements from the platform based on specified filter
|
protected String |
getSelfUri() |
public MeasurementApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, MeasurementsApiRepresentation measurementsApiRepresentation, int pageSize)
public MeasurementRepresentation getMeasurement(com.cumulocity.model.idtype.GId measurementId) throws SDKException
MeasurementApi
getMeasurement
in interface MeasurementApi
measurementId
- id of the measurement to search forSDKException
- if the measurement is not found or if the query failed@Deprecated public void deleteMeasurement(MeasurementRepresentation measurement) throws SDKException
MeasurementApi
deleteMeasurement
in interface MeasurementApi
measurement
- to be deletedSDKException
- if the measurement could not be deletedpublic void delete(MeasurementRepresentation measurement) throws SDKException
MeasurementApi
delete
in interface MeasurementApi
measurement
- to be deletedSDKException
- if the measurement could not be deletedpublic void deleteMeasurementsByFilter(MeasurementFilter filter) throws IllegalArgumentException, SDKException
MeasurementApi
deleteMeasurementsByFilter
in interface MeasurementApi
filter
- the filter criteria(s)IllegalArgumentException
- when invalid filter providedSDKException
- if the query failedpublic MeasurementCollection getMeasurementsByFilter(MeasurementFilter filter) throws SDKException
MeasurementApi
getMeasurementsByFilter
in interface MeasurementApi
filter
- the filter criteria(s)SDKException
- if the query failedpublic MeasurementCollection getMeasurements() throws SDKException
MeasurementApi
getMeasurements
in interface MeasurementApi
SDKException
- if the query failedpublic MeasurementRepresentation create(MeasurementRepresentation measurementRepresentation) throws SDKException
MeasurementApi
create
in interface MeasurementApi
measurementRepresentation
- measurement to be createdSDKException
- if the measurement could not be createdpublic MeasurementCollectionRepresentation createBulk(MeasurementCollectionRepresentation measurementCollection)
MeasurementApi
createBulk
in interface MeasurementApi
measurementCollection
- measurements to be createdpublic void createBulkWithoutResponse(MeasurementCollectionRepresentation measurementCollection)
MeasurementApi
createBulkWithoutResponse
in interface MeasurementApi
measurementCollection
- measurements to be createdpublic void createWithoutResponse(MeasurementRepresentation measurementRepresentation) throws SDKException
MeasurementApi
createWithoutResponse
in interface MeasurementApi
measurementRepresentation
- measurement to be createdSDKException
- if the measurement could not be createdpublic Future createAsync(MeasurementRepresentation measurementRepresentation) throws SDKException
MeasurementApi
createAsync
in interface MeasurementApi
measurementRepresentation
- measurement to be createdSDKException
- if the measurement could not be createdprotected String getSelfUri() throws SDKException
SDKException
Copyright © 2020 (C) Cumulocity GmbH. All rights reserved.