Class AlarmFilter


  • public class AlarmFilter
    extends Filter
    A filter to be used in alarm queries. The setter (by*) methods return the filter itself to provide chaining: AlarmFilter filter = new AlarmFilter().byStatus(st).bySource(src);
    • Constructor Detail

      • AlarmFilter

        public AlarmFilter()
    • Method Detail

      • bySource

        public AlarmFilter bySource​(GId source)
        Specifies the source query parameter
        Parameters:
        source - the managed object that generated the alarm(s)
        Returns:
        the alarm filter with source set
      • bySource

        @Deprecated
        public AlarmFilter bySource​(ManagedObjectRepresentation source)
        Deprecated.
        Specifies the source query parameter
        Parameters:
        source - the managed object that generated the alarm(s)
        Returns:
        the alarm filter with source set
      • byStatus

        public AlarmFilter byStatus​(CumulocityAlarmStatuses... statuses)
        Specifies the status query parameter
        Parameters:
        statuses - status array of the alarm(s)
        Returns:
        the alarm filter with statuses set
      • getStatus

        public String getStatus()
        Returns:
        the status parameter of the query
      • bySeverity

        public AlarmFilter bySeverity​(CumulocitySeverities severity)
        Specifies the severity query parameter
        Parameters:
        severity - severity of the alarm(s)
        Returns:
        the alarm filter with severity set
      • getSeverity

        public String getSeverity()
        Returns:
        the severity parameter of the query
      • getSource

        public String getSource()
        Returns:
        the source parameter of the query
      • byDate

        public AlarmFilter byDate​(Date fromDate,
                                  Date toDate)
        Specifies the fromDate and toDate query parameters for query in a time range.
        Parameters:
        fromDate - the start date time of the range
        toDate - the end date time of the range
        Returns:
        the alarm filter with fromDate and toDate set.
      • byFromDate

        public AlarmFilter byFromDate​(Date fromDate)
        Specifies the fromDate query parameter for querying all alarms from the specified date time.
        Parameters:
        fromDate - the date time from which all alarms to be returned.
        Returns:
        the alarm filter with fromDate set
      • getFromDate

        public String getFromDate()
      • getToDate

        public String getToDate()
      • getResolved

        public String getResolved()
      • getType

        public String getType()