Back to bricks list
Introduction
Technical Documentation
Other Classes
ParamSet
Version

ParamSet

ParamSet. Use to define a group of parameters that can be added multiple times. This will provid a list of dictionary as values : List[Dict[str, Any]]

Attributes

PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: Optionaldefault_value: Optionalhuman_name: Optionalmax_number_of_occurrences: intoptional: boolparam_set: Dictshort_description: Optionalvisibility: Literal

Functions

__INIT__
Parameters:
NameTypeDefault valueDescription
param_setDict
optionalbool False It true, the param_set can have 0 occurence, the value will then be an empty array []. optional[str]
visibilityLiteral public Visibility of the param. it override all child spec visibility. see doc on type paramspecvisibilty for more info paramspecvisibilty
human_nameOptional Human readable name of the param, showed in the interface [str]
short_descriptionOptional Description of the param, showed in the interface [str]
max_number_of_occurrencesint -1 Nb max of occurence of values the params. if negative, there is no limit. optional[str]
BUILD

Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.

Parameters:
NameTypeDefault valueDescription
valueAny
Return type:
Any
GET_DEFAULT_VALUE
Return type:
ParamSpecType
TO_DTO
Return type:
ParamSpecDTO
TO_SIMPLE_DTO
Return type:
ParamSpecSimpleDTO
VALIDATE

Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.l

Parameters:
NameTypeDefault valueDescription
valueList
Return type:
ParamSpecType
EMPTY - @classmethod
Return type:
ParamSpec
GET_ADDITIONAL_INFOS - @classmethod
Return type:
Dict
GET_DEFAULT_VALUE_PARAM_SPEC - @classmethod
Return type:
ParamSet
GET_STR_TYPE - @classmethod
Return type:
str
LOAD_FROM_DTO - @classmethod
Parameters:
NameTypeDefault valueDescription
spec_dtoParamSpecDTO
Return type:
ParamSet
TO_PARAM_SPEC_INFO_SPECS - @classmethod
Return type:
ParamSpecInfoSpecs