public interface RulesService
Rule
s.Modifier and Type | Method and Description |
---|---|
List<Rule> |
getAllRules()
Get all rules available in the system.
|
Map<String,RuleStatistics> |
getAllRuleStatistics()
Retrieves the statistics for all the rules
|
Set<Rule> |
getMatchingRules(Event event)
Retrieves all the matching rules for a specific event
|
Rule |
getRule(String ruleId)
Retrieves the rule identified by the specified identifier.
|
PartialList<Rule> |
getRuleDetails(Query query)
Retrieves rule details for rules matching the specified query.
|
Set<Metadata> |
getRuleMetadatas()
Retrieves the metadata for all known rules.
|
PartialList<Metadata> |
getRuleMetadatas(Query query)
Retrieves rule metadatas for rules matching the specified
Query . |
RuleStatistics |
getRuleStatistics(String ruleId)
Retrieves the statistics for a rule
|
Set<Condition> |
getTrackedConditions(Item item)
Retrieves tracked conditions (rules with a condition marked with the
trackedCondition tag and which sourceEventCondition matches the specified item) for the
specified item. |
void |
refreshRules()
Refresh the rules for this instance by reloading them from the persistence backend
|
void |
removeRule(String ruleId)
Deletes the rule identified by the specified identifier.
|
void |
resetAllRuleStatistics()
Resets all the rule statistics to zero, useful when testing or if you want to set a point in time.
|
void |
setRule(Rule rule)
Persists the specified rule to the context server.
|
Set<Metadata> getRuleMetadatas()
PartialList<Metadata> getRuleMetadatas(Query query)
Query
.query
- the query the rules which metadata we want to retrieve must matchPartialList
of rules metadata for the rules matching the specified queryPartialList<Rule> getRuleDetails(Query query)
query
- the query specifying which rules to retrievePartialList
of rule details for the rules matching the specified queryList<Rule> getAllRules()
Rule getRule(String ruleId)
ruleId
- the identifier of the rule we want to retrievenull
if no such rule exists.RuleStatistics getRuleStatistics(String ruleId)
ruleId
- the identifier of the ruleMap<String,RuleStatistics> getAllRuleStatistics()
void resetAllRuleStatistics()
void setRule(Rule rule)
rule
- the rule to be persistedvoid removeRule(String ruleId)
ruleId
- the identifier of the rule we want to deleteSet<Condition> getTrackedConditions(Item item)
trackedCondition
tag and which sourceEventCondition
matches the specified item) for the
specified item.item
- the item which tracked conditions we want to retrieveSet<Rule> getMatchingRules(Event event)
event
- the event we want to retrieve all the matching rules forvoid refreshRules()
Copyright © 2014–2023 Apache Software Foundation. All rights reserved.