com.cumulocity.sdk.client.measurement
Class MeasurementApiImpl

java.lang.Object
  extended by com.cumulocity.sdk.client.measurement.MeasurementApiImpl
All Implemented Interfaces:
MeasurementApi

public class MeasurementApiImpl
extends Object
implements MeasurementApi


Constructor Summary
MeasurementApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformUrl)
          Deprecated. 
MeasurementApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformUrl, int pageSize)
           
 
Method Summary
 MeasurementRepresentation create(MeasurementRepresentation measurementRepresentation)
          Creates measurement in the platform.
 void deleteMeasurement(MeasurementRepresentation measurement)
          Deletes measurement from the platform.
 MeasurementRepresentation getMeasurement(GId measurementId)
          Gets measurement by id
 PagedCollectionResource<MeasurementCollectionRepresentation> getMeasurements()
          Gets the all the measurement in the platform
 PagedCollectionResource<MeasurementCollectionRepresentation> getMeasurementsByFilter(MeasurementFilter filter)
          Gets the measurements from the platform based on specified filter
protected  String getSelfUri()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurementApiImpl

@Deprecated
public MeasurementApiImpl(RestConnector restConnector,
                                     TemplateUrlParser templateUrlParser,
                                     String platformUrl)
Deprecated. 


MeasurementApiImpl

public MeasurementApiImpl(RestConnector restConnector,
                          TemplateUrlParser templateUrlParser,
                          String platformUrl,
                          int pageSize)
Method Detail

getMeasurement

public MeasurementRepresentation getMeasurement(GId measurementId)
                                         throws SDKException
Description copied from interface: MeasurementApi
Gets measurement by id

Specified by:
getMeasurement in interface MeasurementApi
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

public void deleteMeasurement(MeasurementRepresentation measurement)
                       throws SDKException
Description copied from interface: MeasurementApi
Deletes measurement from the platform. The measurement to be deleted is identified by the id within the given measurement.

Specified by:
deleteMeasurement in interface MeasurementApi
Parameters:
measurement - to be deleted
Throws:
SDKException - if the measurement could not be deleted

getMeasurementsByFilter

public PagedCollectionResource<MeasurementCollectionRepresentation> getMeasurementsByFilter(MeasurementFilter filter)
                                                                                     throws SDKException
Description copied from interface: MeasurementApi
Gets the measurements from the platform based on specified filter

Specified by:
getMeasurementsByFilter in interface MeasurementApi
Parameters:
filter - the filter criteria(s)
Returns:
collection of measurements matched by the filter with paging functionality
Throws:
SDKException - if the query failed

getMeasurements

public PagedCollectionResource<MeasurementCollectionRepresentation> getMeasurements()
                                                                             throws SDKException
Description copied from interface: MeasurementApi
Gets the all the measurement in the platform

Specified by:
getMeasurements in interface MeasurementApi
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: MeasurementApi
Creates measurement in the platform. The id of the measurement must not be set, since it will be generated by the platform

Specified by:
create in interface MeasurementApi
Parameters:
measurementRepresentation - measurement to be created
Returns:
the created measurement with the generated id
Throws:
SDKException - if the measurement could not be created

getSelfUri

protected String getSelfUri()
                     throws SDKException
Throws:
SDKException


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.