Kaa allows for aggregating endpoints related to the same application into endpoint groups. An endpoint group represents an independent managed entity which is defined by the profile filters assigned to the group. Those endpoints whose profiles match the profile filters of the specific endpoint group become automatically registered as members of this group. There is no restriction for endpoints on having membership in a number of groups at a time.
Endpoint group profile filters are predicate expressions which define characteristics of group members (endpoints). These filters are executed against the endpoint profile to figure out whether or not the endpoint belongs to the group.
Different profile schema versions may require separate profile filters due to the schema structural differences.
In case a group has no filter assigned for a specific profile schema version, the group does not apply to the endpoints that use the profile of this schema version.
Every endpoint group within the application has a unique weight value assigned to it. The weight value is used to resolve conflicts among endpoint groups: in general, the larger the weight, the higher the group priority.
Every Kaa application comes with the default, non-user-editable group "all", with the weight value 0. The profile filter of this group is automatically set to "true" for every profile schema version in the system. As a result, the "all" group contains every endpoint registered in the application. The "all" group is used to define the default configuration, default notification topics access list, and for some other special functions.
Profile filters in Kaa are based on the Spring Expression Language (SpEL). All filters must be specified as predicates (statements which may be either true or false).
For further reference on the filters syntax, please refer to the Spring documentation.
The following example illustrates the general idea of profile filters.
At first, let's assume the following profile schema.
Second, let's assume the following endpoint profile, which corresponds to the schema.
- At last, the following filters would be true when applied to the given endpoint.
|The profile contains simpleField with the value 'SIMPLE_FIELD'.|
|The profile contains arraySimpleField, which is an array containing the element 'VALUE2' in the position 1.|
|The profile contains arraySimpleField, which is a collection containing two elements.|
|The profile contains recordField, which is a record containing otherSimpleField set to '123'.|
|The profile contains recordField, which is a record containing otherMapSimpleField, which is a collection containing two entries.|
|The profile contains arrayRecordField, which is an array. This array contains an element in the position 1, which is a record containing otherSimpleField set to '789'.|
|The profile contains arrayRecordField, which is an array. This array contains an element in the position 1, which is a record containing otherMapSimpleField, which is a map. This map contains an entry with the key KEY5 and the value 5.|
|The profile contains mapSimpleField, which is a map containing an entry with the key KEY8 and the value 8.|
|The profile contains mapRecordField, which is a map containing an entry with the key SOME_KEY2 and the value that is a record. This record contains otherSimpleField with the value 654.|
|The profile contains mapRecordField, which is a map containing an entry with the key SOME_KEY2 and the value that is a record. The record contains otherMapSimpleField, which is a map containing an entry with the key KEY12 and the value 12.|
|An example of how to use a new object instance in a query.|
|An example of how to check a field for the null value.|
arraySimpleField=='VALUE2' and ((arraySimpleField.size()==2)
|An example of how to combine several conditions in a query.|
|The arrayRecordField field is an array of records. It contains at least one element that contains otherSimpleField with the value 456.|