Package com.cumulocity.sdk.client.alarm
Class AlarmApiImpl
java.lang.Object
com.cumulocity.sdk.client.alarm.AlarmApiImpl
- All Implemented Interfaces:
AlarmApi
-
Constructor Summary
ConstructorsConstructorDescriptionAlarmApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, AlarmsApiRepresentation alarmsApiRepresentation, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptioncreate(AlarmRepresentation representation) Creates an alarm in the platform.createAsync(AlarmRepresentation representation) Creates an alarm in the platform.voiddeleteAlarmsByFilter(AlarmFilter filter) Delete alarms from the platform based on the specified filterGets an alarm by idGets all alarms from the platformgetAlarmsByFilter(AlarmFilter filter) Gets alarms from the platform based on the specified filterupdate(AlarmRepresentation alarmToUpdate) Updates an alarm in the platform.updateAlarm(AlarmRepresentation alarmToUpdate) Deprecated.
-
Constructor Details
-
AlarmApiImpl
public AlarmApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, AlarmsApiRepresentation alarmsApiRepresentation, int pageSize)
-
-
Method Details
-
getAlarm
Description copied from interface:AlarmApiGets an alarm by id- Specified by:
getAlarmin interfaceAlarmApi- 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
@Deprecated public AlarmRepresentation updateAlarm(AlarmRepresentation alarmToUpdate) throws SDKException Deprecated.Description copied from interface:AlarmApiUpdates an alarm in the platform. The alarm to be updated is identified by the id within the given alarm.- Specified by:
updateAlarmin interfaceAlarmApi- Parameters:
alarmToUpdate- to be updated- Returns:
- the updated alarm
- Throws:
SDKException- if the alarm could not be updated
-
update
Description copied from interface:AlarmApiUpdates an alarm in the platform. The alarm to be updated is identified by the id within the given alarm.- Specified by:
updatein interfaceAlarmApi- Parameters:
alarmToUpdate- to be updated- Returns:
- the updated alarm
- Throws:
SDKException- if the alarm could not be updated
-
getAlarms
Description copied from interface:AlarmApiGets all alarms from the platform- Specified by:
getAlarmsin interfaceAlarmApi- Returns:
- collection of alarms with paging functionality
- Throws:
SDKException- if the query failed
-
create
Description copied from interface:AlarmApiCreates an alarm in the platform. The id of the alarm must not be set, since it will be generated by the platform- Specified by:
createin interfaceAlarmApi- Parameters:
representation- alarm to be created- Returns:
- the created alarm with the generated id
- Throws:
SDKException- if the alarm could not be created
-
createAsync
Description copied from interface:AlarmApiCreates an alarm in the platform. Immediate response is available through the Future object. In case of lost connection, buffers data in persistence provider.- Specified by:
createAsyncin interfaceAlarmApi- Parameters:
representation- alarm to be created- Returns:
- the created alarm with the generated id
- Throws:
SDKException- if the alarm could not be created
-
getAlarmsByFilter
Description copied from interface:AlarmApiGets alarms from the platform based on the specified filter- Specified by:
getAlarmsByFilterin interfaceAlarmApi- Parameters:
filter- the filter criteria(s)- Returns:
- collection of alarms matched by the filter with paging functionality
- Throws:
SDKException- if the query failed
-
deleteAlarmsByFilter
Description copied from interface:AlarmApiDelete alarms from the platform based on the specified filter- Specified by:
deleteAlarmsByFilterin interfaceAlarmApi- Parameters:
filter- the filter criteria(s)- Throws:
SDKException- if the query failedIllegalArgumentException
-