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

PropertyReturnsDescription
filterTypeStringWhether this item is included or excluded from the selection: "inclusive" or "exclusive".
idlongThe id of the user, group, organisation or org type this item selects.
textStringThe display label for this item, resolved by setItemText from the entity it refers to. May be null until resolved.
typeStringThe 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.