Search in sources :

Example 1 with AlertSource

use of com.thinkbiganalytics.alerts.spi.AlertSource in project kylo by Teradata.

the class AggregatingAlertProvider method getAlert.

/* (non-Javadoc)
     * @see com.thinkbiganalytics.alerts.api.AlertProvider#getAlert(com.thinkbiganalytics.alerts.api.Alert.ID)
     */
@Override
public Optional<Alert> getAlert(ID id) {
    SourceAlertID alertId = asSourceAlertId(id);
    AlertSource src = getSource(alertId.sourceId);
    if (src != null) {
        return getAlert(alertId.alertId, src, false);
    } else {
        return null;
    }
}
Also used : AlertSource(com.thinkbiganalytics.alerts.spi.AlertSource)

Example 2 with AlertSource

use of com.thinkbiganalytics.alerts.spi.AlertSource in project kylo by Teradata.

the class AggregatingAlertProvider method getAlertAsServiceAccount.

public Optional<Alert> getAlertAsServiceAccount(ID id) {
    SourceAlertID alertId = asSourceAlertId(id);
    AlertSource src = getSource(alertId.sourceId);
    if (src != null) {
        return getAlert(alertId.alertId, src, true);
    } else {
        return null;
    }
}
Also used : AlertSource(com.thinkbiganalytics.alerts.spi.AlertSource)

Aggregations

AlertSource (com.thinkbiganalytics.alerts.spi.AlertSource)2