Rule matcher plugins
This guide introduces you how to configure Rule matcher plugins.
These plugins allow to define if a product should be sent according to its content and metadata.
Here is the list of documented plugins:
- Default Rule Matcher allows sending a notification if its content json properties match specific values
- Lucene Rule Matcher allows sending a notification if its content or its metadata match given Lucene expressions
All the plugins implements the IRuleMatcher interface.
If you want to create your own implementation of one of these extension points, you need to extend the specific interface indicated.
Default Rule Matcher
This rule matcher allows to check into notification content if a json property matches given specific value. If so, the
notification is sent to associated Recipient sender plugin(s).
Configuration parameters are:
Name | Type | Description |
---|---|---|
attributeToSeek | String | attribute name to search for the notification json content |
attributeValueToSeek | String | attribute value to match |
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "DefaultRuleMatcher",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "attributeToSeek",
"type": "STRING",
"value": "session"
},
{
"name": "attributeValueToSeek",
"type": "STRING",
"value": "REGARDS-NOTIF-AIP"
]
}
}
Lucene Rule Matcher
This rule matcher allows to check if notification content or metadata matches given lucene expression. If so, the notification is sent to associated Recipient sender plugin(s). Configuration parameters are:
Name | Type | Description |
---|---|---|
payload_rule | String | Lucene expression to seek inside the payload of the input |
metadata_rule | String | Lucene expression to seek inside the metadata of the input |
You can check the Lucene guide to create your lucene query
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "LuceneRuleMatcher",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "payload_rule",
"type": "STRING",
"value": "properties.is_valid: true
},
{
"name": "metadata_rule",
"type": "STRING",
"value": "action: CREATED"
}
]
}
}