com.cumulocity.sdk.client.alarm
Class AlarmApiImpl

java.lang.Object
  extended by com.cumulocity.sdk.client.alarm.AlarmApiImpl
All Implemented Interfaces:
AlarmApi

public class AlarmApiImpl
extends Object
implements AlarmApi


Constructor Summary
AlarmApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platfromApiUri)
          Deprecated. 
AlarmApiImpl(RestConnector restConnector, TemplateUrlParser templateUrlParser, String platformApiUri, int pageSize)
           
 
Method Summary
 AlarmRepresentation create(AlarmRepresentation representation)
          Creates an alarm in the platform.
 AlarmRepresentation getAlarm(GId alarmId)
          Gets an alarm by id
 PagedCollectionResource<AlarmCollectionRepresentation> getAlarms()
          Gets all alarms from the platform
 PagedCollectionResource<AlarmCollectionRepresentation> getAlarmsByFilter(AlarmFilter alarmFilter)
          Gets alarms from the platform based on the specified filter
 AlarmRepresentation updateAlarm(AlarmRepresentation alarmToUpdate)
          Updates an alarm in the platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlarmApiImpl

@Deprecated
public AlarmApiImpl(RestConnector restConnector,
                               TemplateUrlParser templateUrlParser,
                               String platfromApiUri)
Deprecated. 


AlarmApiImpl

public AlarmApiImpl(RestConnector restConnector,
                    TemplateUrlParser templateUrlParser,
                    String platformApiUri,
                    int pageSize)
Method Detail

getAlarm

public AlarmRepresentation getAlarm(GId alarmId)
                             throws SDKException
Description copied from interface: AlarmApi
Gets an alarm by id

Specified by:
getAlarm in interface AlarmApi
Parameters:
alarmId - id of the alarm to search for
Returns:
the alarm with the given id
Throws:
SDKException - if the alarm is not found or if the query failed

updateAlarm

public AlarmRepresentation updateAlarm(AlarmRepresentation alarmToUpdate)
                                throws SDKException
Description copied from interface: AlarmApi
Updates an alarm in the platform. The alarm to be updated is identified by the id within the given alarm.

Specified by:
updateAlarm in interface AlarmApi
Parameters:
alarmToUpdate - to be updated
Returns:
the updated alarm
Throws:
SDKException - if the alarm could not be updated

getAlarms

public PagedCollectionResource<AlarmCollectionRepresentation> getAlarms()
                                                                 throws SDKException
Description copied from interface: AlarmApi
Gets all alarms from the platform

Specified by:
getAlarms in interface AlarmApi
Returns:
collection of alarms with paging functionality
Throws:
SDKException - if the query failed

create

public AlarmRepresentation create(AlarmRepresentation representation)
                           throws SDKException
Description copied from interface: AlarmApi
Creates an alarm in the platform. The id of the alarm must not be set, since it will be generated by the platform

Specified by:
create in interface AlarmApi
Parameters:
representation - alarm to be created
Returns:
the created alarm with the generated id
Throws:
SDKException - if the alarm could not be created

getAlarmsByFilter

public PagedCollectionResource<AlarmCollectionRepresentation> getAlarmsByFilter(AlarmFilter alarmFilter)
                                                                         throws SDKException
Description copied from interface: AlarmApi
Gets alarms from the platform based on the specified filter

Specified by:
getAlarmsByFilter in interface AlarmApi
Parameters:
alarmFilter - the filter criteria(s)
Returns:
collection of alarms matched by the filter with paging functionality
Throws:
SDKException - if the query failed


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