Class KpiAlert

java.lang.Object
com.gooddata.sdk.model.md.AbstractObj
com.gooddata.sdk.model.md.dashboard.KpiAlert
All Implemented Interfaces:
Obj, Queryable, Updatable, java.io.Serializable

public class KpiAlert
extends AbstractObj
implements Queryable, Updatable
Represents KPI alert set for some KPI on analytical dashboard.
See Also:
Serialized Form
  • 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 title
      kpiUri - URI of the KPI for which the alert is defined
      dashboardUri - URI of the KPI where the KPI alert is located
      threshold - KPI alert threshold
      triggerCondition - condition for triggering KPI alert
      filterContextUri - 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

      public KpiAlert withTriggeredState​(boolean wasTriggered)
      Creates new copy of KPI alert with a given triggered state changed.
      Parameters:
      wasTriggered - triggered state
      Returns:
      new KPI alert