Package com.cumulocity.sdk.client.alarm
Class AlarmFilter
- java.lang.Object
-
- com.cumulocity.sdk.client.Filter
-
- com.cumulocity.sdk.client.alarm.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 Summary
Constructors Constructor Description AlarmFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AlarmFilter
byDate(Date fromDate, Date toDate)
Specifies thefromDate
andtoDate
query parameters for query in a time range.AlarmFilter
byFromDate(Date fromDate)
Specifies thefromDate
query parameter for querying all alarms from the specified date time.AlarmFilter
byResolved(Boolean resolved)
AlarmFilter
bySeverity(CumulocitySeverities severity)
Specifies theseverity
query parameterAlarmFilter
bySource(GId source)
Specifies thesource
query parameterAlarmFilter
bySource(ManagedObjectRepresentation source)
Deprecated.AlarmFilter
byStatus(CumulocityAlarmStatuses... statuses)
Specifies thestatus
query parameterAlarmFilter
byType(String type)
String
getFromDate()
String
getResolved()
String
getSeverity()
String
getSource()
String
getStatus()
String
getToDate()
String
getType()
-
Methods inherited from class com.cumulocity.sdk.client.Filter
encode, getQueryParams
-
-
-
-
Method Detail
-
bySource
public AlarmFilter bySource(GId source)
Specifies thesource
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 thesource
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 thestatus
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 theseverity
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 thefromDate
andtoDate
query parameters for query in a time range.- Parameters:
fromDate
- the start date time of the rangetoDate
- the end date time of the range- Returns:
- the alarm filter with
fromDate
andtoDate
set.
-
byFromDate
public AlarmFilter byFromDate(Date fromDate)
Specifies thefromDate
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()
-
byResolved
public AlarmFilter byResolved(Boolean resolved)
-
getType
public String getType()
-
byType
public AlarmFilter byType(String type)
-
-