Represents a single entry in a generalised org, user, group or org type selector, used together with the jquery.kselector widget to build inclusion or exclusion lists. A selector list is a JSON array of these items, each recording what kind of entity is selected, whether it is included or excluded, and a display label resolved for the current tenant. Managers such as SelectorManager and PromotionsManager parse and match selector lists built from this class.
Properties
| Property | Returns | Description |
|---|---|---|
| filterType | String | Whether this item is included or excluded from the selection: "inclusive" or "exclusive". |
| id | long | The id of the user, group, organisation or org type this item selects. |
| text | String | The display label for this item, resolved by setItemText from the entity it refers to. May be null until resolved. |
| type | String | The kind of entity this item selects: one of the OBJECT_TYPE_* constants (org, group, user or orgType). |
Methods
getType()
Returns: String
The kind of entity this item selects: one of the OBJECT_TYPE_* constants (org, group, user or orgType).
getFilterType()
Returns: String
Whether this item is included or excluded from the selection: "inclusive" or "exclusive".
getId()
Returns: long
The id of the user, group, organisation or org type this item selects.
getText()
Returns: String
The display label for this item, resolved by setItemText from the entity it refers to. May be null until resolved.
withExcluded()
Returns: KSelectorItem
Sets this item's filter type to exclusive.
withIncluded()
Returns: KSelectorItem
Sets this item's filter type to inclusive.
included()
Returns: boolean
Whether this item is an inclusive selector, that is its filter type is "inclusive".
typeIsOrg()
Returns: boolean
Whether this item selects an organisation, that is its type is OBJECT_TYPE_ORG.