Interface MeasurementApi

All Known Implementing Classes:
MeasurementApiImpl

public interface MeasurementApi
API for creating, deleting and retrieving measurements from the platform.
  • Method Details

    • 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

      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

      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 provided
      SDKException - 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