Package io.dialob.session.engine.program
Class AbstractItemBuilder<T extends AbstractItemBuilder<T,P>,P extends ExpressionCompiler & BuilderParent>
java.lang.Object
io.dialob.session.engine.program.AbstractItemBuilder<T,P>
- All Implemented Interfaces:
Builder<P>,AliasesProvider
- Direct Known Subclasses:
GroupBuilder,QuestionBuilder,SurveyGroupBuilder,ValidationBuilder,ValueSetBuilder,ValueSetEntryBuilder,VariableBuilder
public abstract class AbstractItemBuilder<T extends AbstractItemBuilder<T,P>,P extends ExpressionCompiler & BuilderParent>
extends Object
implements Builder<P>, AliasesProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Expressionprotected Labelstatic final ImmutableLabelprotected Label -
Constructor Summary
ConstructorsConstructorDescriptionAbstractItemBuilder(ProgramBuilder programBuilder, P parent, GroupBuilder hoistingGroupBuilder, String id) -
Method Summary
Modifier and TypeMethodDescriptionaddClassname(String className) addClassname(String when, String className) addClassnames(List<String> classNames) protected voidafterExpressionCompilation(Consumer<io.dialob.api.form.FormValidationError> errorConsumer) protected voidbeforeExpressionCompilation(Consumer<io.dialob.api.form.FormValidationError> errorConsumer) build()protected voiddoBuild()protected io.dialob.api.form.FormValidationError.Typeprotected Optional<GroupBuilder> getId()getIndex()protected ProgramBuilderprotected voidrequireBooleanExpression(Expression expression, io.dialob.api.form.FormValidationError.Type type, Consumer<io.dialob.api.form.FormValidationError> errorConsumer) protected TsetActiveWhen(Expression activeWhen) setActiveWhen(String activeWhen) setDescription(String language, String description) setDescription(Map<String, String> description)
-
Field Details
-
EMPTY_LABEL
-
label
-
description
-
activeWhen
-
props
-
-
Constructor Details
-
AbstractItemBuilder
public AbstractItemBuilder(ProgramBuilder programBuilder, P parent, GroupBuilder hoistingGroupBuilder, @NonNull String id)
-
-
Method Details
-
getProgramBuilder
-
addClassname
-
addClassname
-
setLabel
-
setLabel
-
setDescription
-
setDescription
-
setActiveWhen
-
getIndex
-
getActiveWhenExpressionErrorType
@NonNull protected io.dialob.api.form.FormValidationError.Type getActiveWhenExpressionErrorType() -
setProps
-
getAliases
- Specified by:
getAliasesin interfaceAliasesProvider
-
setActiveWhen
-
requireBooleanExpression
protected void requireBooleanExpression(Expression expression, io.dialob.api.form.FormValidationError.Type type, Consumer<io.dialob.api.form.FormValidationError> errorConsumer) -
addClassnames
-
build
-
doBuild
protected void doBuild() -
beforeExpressionCompilation
protected void beforeExpressionCompilation(Consumer<io.dialob.api.form.FormValidationError> errorConsumer) -
afterExpressionCompilation
protected void afterExpressionCompilation(Consumer<io.dialob.api.form.FormValidationError> errorConsumer) -
getId
-
getValueType
-
getHoistingGroup
-
findHostingRowgroupId
-