Class KpiAlert
java.lang.Object
com.gooddata.sdk.model.md.AbstractObj
com.gooddata.sdk.model.md.dashboard.KpiAlert
public class KpiAlert extends AbstractObj implements Queryable, Updatable
Represents KPI alert set for some KPI on analytical dashboard.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface com.gooddata.sdk.model.md.Obj
CREATE_URI, CREATE_WITH_ID_URI, OBJ_URI, URI -
Constructor Summary
Constructors Constructor Description KpiAlert(java.lang.String title, java.lang.String kpiUri, java.lang.String dashboardUri, double threshold, java.lang.String triggerCondition, java.lang.String filterContextUri)Constructor. -
Method Summary
Modifier and Type Method Description java.lang.StringgetDashboardUri()java.lang.StringgetFilterContextUri()java.lang.StringgetKpiUri()doublegetThreshold()java.lang.StringgetTriggerCondition()booleanwasTriggered()KpiAlertwithTriggeredState(boolean wasTriggered)Creates new copy of KPI alert with a given triggered state changed.Methods inherited from class com.gooddata.sdk.model.md.AbstractObj
getAuthor, getCategory, getContributor, getCreated, getFlags, getId, getIdentifier, getSummary, getTags, getTitle, getUpdated, getUri, isDeprecated, isLocked, isProduction, isSharedWithSomeone, isUnlisted, setCategory, setDeprecated, setFlags, setIdentifier, setLocked, setProduction, setSharedWithSomeone, setSummary, setTags, setTitle, setUnlisted, toString, uris
-
Constructor Details
-
KpiAlert
public KpiAlert(java.lang.String title, java.lang.String kpiUri, java.lang.String dashboardUri, double threshold, java.lang.String triggerCondition, java.lang.String filterContextUri)Constructor.- Parameters:
title- KPI alert titlekpiUri- URI of the KPI for which the alert is defineddashboardUri- URI of the KPI where the KPI alert is locatedthreshold- KPI alert thresholdtriggerCondition- condition for triggering KPI alertfilterContextUri- URI of filter context used for computation of KPI alert (optional)
-
-
Method Details
-
wasTriggered
public boolean wasTriggered()- Returns:
- if the KPI alert was already triggered
-
getThreshold
public double getThreshold()- Returns:
- KPI value threshold for triggering KPI alert
-
getFilterContextUri
public java.lang.String getFilterContextUri()- Returns:
- filters used for computation of KPI alert
-
getTriggerCondition
public java.lang.String getTriggerCondition()- Returns:
- condition for triggering KPI alert (e.g.
"above_threshold")
-
getDashboardUri
public java.lang.String getDashboardUri()- Returns:
- URI of the analytical dashboard where the alert is located
-
getKpiUri
public java.lang.String getKpiUri()- Returns:
- URI of the KPI for which is the alert configured
-
withTriggeredState
Creates new copy of KPI alert with a given triggered state changed.- Parameters:
wasTriggered- triggered state- Returns:
- new KPI alert
-