Fluent builder for creating a recognition level: extends the common recognition properties with a fixed level amount, an optional lookup-table name, and an optional data series, either of which can override the fixed amount per participant. Obtained from RecognitionManager.newLevelBuilder, which binds it to the topic the level belongs to. Chain the property methods to configure the level, then call build to create and save it.
Group: Builders
Extends: AbstractRecognitionBuilder
Inherited from AbstractRecognitionBuilder
Methods
title(String s) · imageHash(String s) · colour(String s) · assetId(String s) · field1(String s) · field2(String s) · field3(String s) · pointsBucket(Reward s) · numPoints(Double s) · pointsTag(PointsTag pt) · pointsReason(String pointsReason) · pointsRuleTypeId(String s) · pointsRuleConfig(String s)
title(String s)
Returns: AbstractRecognitionBuilder
Sets the display title for the recognition being built.
| Parameter | Description |
|---|---|
s | the display title |
imageHash(String s)
Returns: AbstractRecognitionBuilder
Sets the image hash for the recognition being built.
| Parameter | Description |
|---|---|
s | the image hash |
colour(String s)
Returns: AbstractRecognitionBuilder
Sets the display colour for the recognition being built.
| Parameter | Description |
|---|---|
s | the colour |
assetId(String s)
Returns: AbstractRecognitionBuilder
Sets the content asset id for the recognition being built.
| Parameter | Description |
|---|---|
s | the asset id |
field1(String s)
Returns: AbstractRecognitionBuilder
Sets the free-form field1 value for the recognition being built.
| Parameter | Description |
|---|---|
s | the field1 value |
field2(String s)
Returns: AbstractRecognitionBuilder
Sets the free-form field2 value for the recognition being built.
| Parameter | Description |
|---|---|
s | the field2 value |
field3(String s)
Returns: AbstractRecognitionBuilder
Sets the free-form field3 value for the recognition being built.
| Parameter | Description |
|---|---|
s | the field3 value |
pointsBucket(Reward s)
Returns: AbstractRecognitionBuilder
Sets the points bucket (reward) that points are credited to or debited from for the recognition being built.
| Parameter | Description |
|---|---|
s | the points bucket |
numPoints(Double s)
Returns: AbstractRecognitionBuilder
Sets the fixed number of points awarded for the recognition being built, used when no points rule type is configured.
| Parameter | Description |
|---|---|
s | the number of points |
pointsTag(PointsTag pt)
Returns: AbstractRecognitionBuilder
Sets the points tag recorded against points awarded for the recognition being built.
| Parameter | Description |
|---|---|
pt | the points tag |
pointsReason(String pointsReason)
Returns: AbstractRecognitionBuilder
Sets the reason text recorded against points awarded for the recognition being built.
| Parameter | Description |
|---|---|
pointsReason | the points reason |
pointsRuleTypeId(String s)
Returns: AbstractRecognitionBuilder
Sets the id of the points rule type used to calculate points for the recognition being built, instead of a fixed amount.
| Parameter | Description |
|---|---|
s | the points rule type id |
pointsRuleConfig(String s)
Returns: AbstractRecognitionBuilder
Sets the XML configuration for the points rule type set on the recognition being built.
| Parameter | Description |
|---|---|
s | the points rule configuration, as XML |
Methods
levelAmount(Object levelAmount)
Returns: RecognitionLevelBuilder
Sets the fixed default threshold amount for the level being built.
| Parameter | Description |
|---|---|
levelAmount | the threshold amount, coerced to a number |
levelLookupName(String s)
Returns: RecognitionLevelBuilder
Sets the name of the lookup table used to override the level's amount per participant, if using one. If no rule in the lookup table matches, the fixed level amount is used instead.
| Parameter | Description |
|---|---|
s | the lookup table name |
levelsDataSeries(SalesDataSeries s)
Returns: RecognitionLevelBuilder
Sets the data series used to look up the level's amount per participant, if using one.
| Parameter | Description |
|---|---|
s | the data series |
build()
Returns: RecognitionLevel
Creates the level with the properties configured on this builder.