public interface DefinitionsService
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(String actionId,
Map<String,String> properties) |
void |
addActionPlugin(String actionPlugin,
Set<String> properties) |
Collection<Condition> |
addCondition(String triggerId,
Trigger.Mode triggerMode,
Condition condition)
A convenience method that adds a new Condition to the existing condition set for the specified
Trigger and trigger mode.
|
Dampening |
addDampening(Dampening dampening) |
void |
addTag(Tag tag)
Add Tag with the specified name to the specified Trigger.
|
void |
addTrigger(Trigger trigger)
Create a new
Trigger. |
Trigger |
copyTrigger(String triggerId,
Map<String,String> dataIdMap)
Used to generate an explicit Trigger from a Tokenized Trigger.
|
Map<String,String> |
getAction(String actionId) |
Set<String> |
getActionPlugin(String actionPlugin) |
Collection<String> |
getActionPlugins() |
Collection<String> |
getActions(String actionPlugin) |
Collection<String> |
getAllActions() |
Collection<Condition> |
getAllConditions() |
Collection<Dampening> |
getAllDampenings() |
Collection<Trigger> |
getAllTriggers() |
Condition |
getCondition(String conditionId) |
Dampening |
getDampening(String dampeningId) |
Trigger |
getTrigger(String triggerId) |
Collection<Condition> |
getTriggerConditions(String triggerId,
Trigger.Mode triggerMode) |
Collection<Dampening> |
getTriggerDampenings(String triggerId,
Trigger.Mode triggerMode) |
List<Tag> |
getTriggerTags(String triggerId,
String category) |
void |
registerListener(DefinitionsListener listener) |
void |
removeAction(String actionId) |
void |
removeActionPlugin(String actionPlugin) |
Collection<Condition> |
removeCondition(String conditionId)
A convenience method that removes a Condition from an existing condition set.
|
void |
removeDampening(String dampeningId) |
void |
removeTags(String triggerId,
String category,
String name)
Delete tag(s) for the specified trigger, optionally filtered by category and/or name.
|
void |
removeTrigger(String triggerId)
The
Trigger will be removed from the Alerts engine, as needed, and will no longer be persisted. |
Collection<Condition> |
setConditions(String triggerId,
Trigger.Mode triggerMode,
Collection<Condition> conditions)
The condition set for a trigger's trigger mode is treated as a whole.
|
void |
updateAction(String actionId,
Map<String,String> properties) |
void |
updateActionPlugin(String actionPlugin,
Set<String> properties) |
Collection<Condition> |
updateCondition(Condition condition)
A convenience method that updates an existing Condition from an existing condition set.
|
Dampening |
updateDampening(Dampening dampening) |
Trigger |
updateTrigger(Trigger trigger)
Update the
Trigger. |
void addTrigger(Trigger trigger) throws Exception
Trigger. Conditions and Actions are manipulated in separate
calls. The new Trigger will be persisted. When fully defined a call to
updateTrigger(Trigger)
is needed to enable the Trigger.trigger - the triggerException - If the Trigger already exists.void removeTrigger(String triggerId) throws Exception
Trigger will be removed from the Alerts engine, as needed, and will no longer be persisted.triggerId - the triggerIdException - on any problemTrigger updateTrigger(Trigger trigger) throws Exception
Trigger. Conditions and Actions are manipulated in separate
calls. The updated Trigger will be persisted. If enabled the Trigger
will be [re-]inserted into the Alerts engine and any prior dampening will be reset.trigger - the triggerException - If the Trigger does not exist.Collection<Trigger> getAllTriggers() throws Exception
ExceptionTrigger copyTrigger(String triggerId, Map<String,String> dataIdMap) throws Exception
triggerId - the triggerIddataIdMap - the dataIdMapException - on any problemCollection<Dampening> getTriggerDampenings(String triggerId, Trigger.Mode triggerMode) throws Exception
triggerId - the triggerIdtriggerMode - Return only dampenings for the given trigger mode. Return all if null.Exception - on any problemCollection<Dampening> getAllDampenings() throws Exception
ExceptionCollection<Condition> addCondition(String triggerId, Trigger.Mode triggerMode, Condition condition) throws Exception
conditionId triggerId triggerMode conditionSetSize conditionSetIndex
triggerId - the triggerIdtriggerMode - the triggerModecondition - Not nullException - on any problemCollection<Condition> removeCondition(String conditionId) throws Exception
conditionId - the conditionIdException - on any problemCollection<Condition> updateCondition(Condition condition) throws Exception
condition - Not null. conditionId must be for an existing condition.Exception - on any problemCollection<Condition> setConditions(String triggerId, Trigger.Mode triggerMode, Collection<Condition> conditions) throws Exception
conditionId triggerId triggerMode conditionSetSize conditionSetIndex
triggerId - the triggerIdtriggerMode - the triggerModeconditions - Not null, Not EmptyException - on any problemCollection<Condition> getTriggerConditions(String triggerId, Trigger.Mode triggerMode) throws Exception
triggerId - the triggerIdtriggerMode - Return only conditions for the given trigger mode. Return all if null.Exception - on any problemCollection<Condition> getAllConditions() throws Exception
Exceptionvoid addActionPlugin(String actionPlugin, Set<String> properties) throws Exception
Exceptionvoid updateActionPlugin(String actionPlugin, Set<String> properties) throws Exception
ExceptionCollection<String> getActionPlugins() throws Exception
Exceptionvoid addAction(String actionId, Map<String,String> properties) throws Exception
Exceptionvoid updateAction(String actionId, Map<String,String> properties) throws Exception
ExceptionCollection<String> getAllActions() throws Exception
ExceptionCollection<String> getActions(String actionPlugin) throws Exception
Exceptionvoid addTag(Tag tag) throws Exception
tag - the tagException - on any problemvoid removeTags(String triggerId, String category, String name) throws Exception
triggerId - NotEmptycategory - Nullablename - NullableException - on any problemList<Tag> getTriggerTags(String triggerId, String category) throws Exception
triggerId - NotEmptycategory - Nullable.Exception - on any problemvoid registerListener(DefinitionsListener listener)
Copyright © 2015 Red Hat, Inc.. All rights reserved.