Class AlarmFilterBuilder
java.lang.Object
com.inductiveautomation.ignition.common.alarming.AlarmFilterBuilder
This class provides a convenient way to build common alarm filters. Each function returns the builder, so they can be
chained together. Each chained invocation results in a new "and" condition. At the end, call
build()
to
retrieve the resulting AlarmFilter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIncludes shelved events in the results.betweenDates
(Date startDate, Date endDate) build()
displayPathFilter
(String[] rawpaths) Adds an "and" filter for alarm display path for each of the given paths.displayPathFilter
(Collection<StringPath> paths) Adds an "and" filter for alarm display path for each of the given pathsdisplayPathThenSourceFilter
(String[] rawFilterPaths) Takes a set of paths, and will filter on display path.eventIdFilter
(String eventId, ComparisonOperator operator) Enables a flag ensuring system events are filtered along with all other events, filters such as priority, state, display or source path, etc.includeSystem
(boolean include) isPriority
(AlarmPriority... priorities) Creates a condition that will pass on any of the given alarm priorities.isState
(AlarmState... states) Creates a condition that will pass on any of the given alarm states.Filters for priorities between (and including) a and bpriority_eq
(AlarmPriority val) priority_gt
(AlarmPriority prio) priority_gte
(AlarmPriority prio) priority_lt
(AlarmPriority prio) priority_lte
(AlarmPriority prio) providerFilter
(String[] providers) sourceFilter
(String[] rawpaths) Adds an "and" filter for alarm source path for each of the given raw paths.sourceFilter
(Collection<QualifiedPath> paths) Adds an "and" filter for alarm source path for each of the given pathssourceOrDisplayPath
(String[] rawpaths) Takes a set of paths, and will filter on source or display path.sourceOrDisplayPath
(Collection<Path> paths) Takes a set of paths, and will filter on source or display path.
-
Constructor Details
-
AlarmFilterBuilder
public AlarmFilterBuilder()
-
-
Method Details
-
build
-
allowShelved
Includes shelved events in the results. Normally shelved events are filtered out. -
includeData
-
includeSystem
-
betweenDates
-
priority_lt
-
priority_lte
-
priority_gt
-
priority_gte
-
priority_between
Filters for priorities between (and including) a and b -
priority_eq
-
sourceFilter
Adds an "and" filter for alarm source path for each of the given paths -
sourceFilter
Adds an "and" filter for alarm source path for each of the given raw paths. The paths can be a qualified path, or a simple path fragment. -
eventIdFilter
-
displayPathFilter
Adds an "and" filter for alarm display path for each of the given paths -
displayPathFilter
Adds an "and" filter for alarm display path for each of the given paths. Paths can be qualified paths or simple path fragments. -
providerFilter
-
sourceOrDisplayPath
Takes a set of paths, and will filter on source or display path. If either passes, the condition will return true. -
displayPathThenSourceFilter
Takes a set of paths, and will filter on display path. If the display path has not been set, the source path will be used as a fallback. However, if the display path is set, it must meet the filter criteria for the condition to return true. -
sourceOrDisplayPath
Takes a set of paths, and will filter on source or display path. If either passes, the condition will return true. -
isState
Creates a condition that will pass on any of the given alarm states. In other words, if more than one state is provided, they will be "OR'd" together. -
isPriority
Creates a condition that will pass on any of the given alarm priorities. In other words, if more than one priority is provided, they will be "OR'd" together. -
filterSystem
Enables a flag ensuring system events are filtered along with all other events, filters such as priority, state, display or source path, etc.
-