new FilterRule(jmap, name)
This class represents a JMAP FilterRule.
The FilterRule object represents the state of incoming message filtering for an account.
Parameters:
Name | Type | Description |
---|---|---|
jmap |
Client | The Client instance that created this FilterRule. |
name |
String | The name of the rule NOTE: How to use and extend this model ? FilterRule is conceived so that a rule can be specified in a highly didactic way. For instance:
To achive this, it uses the builder design pattern. To extend this model with new actions and conditions, you just need to create a new class that extends AbstractConditionAction and implements AbstractConditionAction#_init and AbstractConditionAction#_toJSONObject. AbstractConditionAction#_init is called by AbstractConditionAction' constructor and AbstractConditionAction#_toJSONObject is used to generate a JSON representation of the object. Then, just provide any useful property. To make the new condition or action available to the builder, you need to extend FilterRuleCondition (if defining a new condition) or FilterRuleAction (if defining a new action) |
- Source:
- See:
-
- Model
Extends
- Model