Class: ConditionService

Help4.service.ConditionService(params)

Condition service class.

Constructor

new ConditionService(params)

Parameters:
Name Type Description
params Help4.service.ConditionService.Params
Source:

Extends

Methods

(async) checkConditions(tile) → {Promise.<boolean>}

Parameters:
Name Type Description
tile Object
Properties
Name Type Attributes Description
conditions Array
hotspotAnchor string <optional>
Source:
Returns:
Type
Promise.<boolean>

destroy()

Source:

getConditions() → {Object}

Deliver API conditions.
Source:
Returns:
Type
Object

getURLValue(type) → {string}

Get value from URL.
Parameters:
Name Type Description
type string
Source:
Returns:
Type
string

removeCondition(name) → {boolean}

Remove API condition.
Parameters:
Name Type Description
name string
Source:
Returns:
Type
boolean

setCondition(name, value) → {boolean}

Add an API condition.
Parameters:
Name Type Description
name string
value string | boolean
Source:
Returns:
Type
boolean

setConditions(conditions) → {boolean}

Set multiple API conditions.
Parameters:
Name Type Description
conditions Object
Source:
Returns:
Type
boolean

transformBooleanFormulaToConditions(formula, depthopt) → {Array.<Array.<Help4.service.ConditionService.Condition>>|null}

Transforms a normalized boolean formula into conditions.
Parameters:
Name Type Attributes Default Description
formula Array
depth number <optional>
0
Source:
Returns:
Type
Array.<Array.<Help4.service.ConditionService.Condition>> | null

transformConditionsToBooleanFormula(conditions) → {Array}

Transforms conditions into a normalized boolean formula.
Parameters:
Name Type Description
conditions Array.<Array.<Help4.service.ConditionService.Condition>>
Source:
Returns:
Type
Array

validateCondition(condition, hotspotAnchor) → {boolean|Promise.<boolean>}

Parameters:
Name Type Description
condition Help4.service.ConditionService.Condition
hotspotAnchor string
Source:
Returns:
Type
boolean | Promise.<boolean>

Type Definitions

Condition

Type:
  • Object
Properties:
Name Type Description
c string condition name
v string | boolean condition value
o string condition operator
subtype string condition subtype
anchor * ???
Source:

ConditionType

Type:
  • Object
Properties:
Name Type Description
element 'system_element'
url 'system_url'
Source:

Params

Type:
Source: