public void jsonRead(JsonReader reader, JsonObject jsonObject) throws JsonException {
String text = jsonObject.getString("dataSourceXid");
if (text != null) {
DataSourceVO<?> ds = new DataSourceDao().getDataSource(text);
if (ds == null)
throw new TranslatableJsonException("emport.error.maintenanceEvent.invalid", "dataSourceXid", text);
dataSourceId = ds.getId();
}
text = jsonObject.getString("alarmLevel");
if (text != null) {
alarmLevel = AlarmLevels.CODES.getId(text);
if (!AlarmLevels.CODES.isValidId(alarmLevel))
throw new TranslatableJsonException("emport.error.maintenanceEvent.invalid", "alarmLevel", text,
AlarmLevels.CODES.getCodeList());
}
text = jsonObject.getString("scheduleType");
if (text != null) {
scheduleType = TYPE_CODES.getId(text);
if (!TYPE_CODES.isValidId(scheduleType))
throw new TranslatableJsonException("emport.error.maintenanceEvent.invalid", "scheduleType", text,
TYPE_CODES.getCodeList());
}
}