Kaa provides a mechanism for aggregating endpoints within an application that is based on groups. A group represents an independent management entity of an arbitrary granularity (depending on the profile filters associated with the group). The endpoint groups membership is evaluated for every endpoint registered in the system based on the associated profile filters.
Profile filters are defined as predicate expressions that execute against the endpoint profile. Distinct profile schema versions may require separate filters due to the structural differences. If a group has no filter assigned for a specific profile schema version, it does not apply to the endpoints that supply the profile of that schema version.
Every group in an application has a unique weight associated with it. The weight value is used to resolve conflicts among the groups: in general, the larger the weight, the higher the group priority.
Every Kaa application comes with a special, built-in, non-user-editable group "all" with weight 0. The associated profile filter is automatically set equal to "true" for every profile schema version in the system. This effectively makes group "all" contain every endpoint registered in the application. Group "all" is used to define the default configuration, default topics access list, and for some other special functions.
Profile filters in Kaa are based on the Spring Expression Language (SpEL). All filters must constitute predicates (resolve to boolean values).
For further reference on the filters syntax please refer to the Spring documentation. For some examples of what it is capable of, see the examples below.
Assuming the following profile schema:
and a specific endpoint profile as follows:
all of the filters in the table below would yield "true":
|The profile contains 'simpleField' with the value 'SIMPLE_FIELD'.|
|The profile contains 'arraySimpleField' of array type, containing the element 'VALUE2' in the position 1.|
|The profile contains 'arraySimpleField', which is a collection and contains two elements.|
|The profile contains 'recordField' of record type that has 'otherSimpleField' equal to '123'.|
|The profile contains 'recordField' of record type, which has 'otherMapSimpleField', that is a collection and contains two entries.|
|The profile contains 'arrayRecordField' of array type. This array has an element in the position 1 of record type that has 'otherSimpleField' equal to '789'.|
|The profile contains 'arrayRecordField' of array type. This array has an element in the position 1 of record type that has 'otherMapSimpleField' of map type. The map contains an entry with the key 'KEY5' and the value '5'.|
|The profile contains 'mapSimpleField' of map type that contains an entry with the key 'KEY8' and the value '8'.|
|The profile contains 'mapRecordField' of map type that contains an entry with the key 'SOME_KEY2' and the value that is a record. The record has 'otherSimpleField' with the value '654'.|
|The profile contains 'mapRecordField' of map type that contains an entry with the key 'SOME_KEY2' and the value that is a record. The record has 'otherMapSimpleField' of map type that contains 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 field 'arrayRecordField' is an array of records, and it contains at least one element that has 'otherSimpleField' with the value '456'.|