String url = getAlarmsApiRepresentation().getAlarms().getSelf() + "/" + alarmToUpdate.getId().getValue();
return (AlarmRepresentation) restConnector.put(url, AlarmMediaType.ALARM, prepareForUpdate(alarmToUpdate));
}
private AlarmRepresentation prepareForUpdate(AlarmRepresentation alarm) {
AlarmRepresentation updatable = new AlarmRepresentation();
updatable.setStatus(alarm.getStatus());
updatable.setSeverity(alarm.getSeverity());
updatable.setSource(alarm.getSource());
updatable.setText(alarm.getText());
updatable.setAttrs(alarm.getAttrs());
return updatable;
}