Class FieldTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.composer.ElementTemplate
com.aquima.interactions.test.templates.composer.FieldTemplate
Template that can be used to initialize a field definition.
- Since:
- 6.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FieldTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, AttributeTemplate attribute) protected
FieldTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, String fieldName) -
Method Summary
Modifier and TypeMethodDescriptionaddPrimitiveParameter
(String parameterName, com.aquima.interactions.foundation.DataType primitiveType, String expression) This method can be used to add a primitive parameter value to this field.addTextParameter
(String parameterName, String contentItem) This method can be used to add a text parameter value to this field.addValidation
(String type) This method may be used to add a validation to the field.protected com.aquima.interactions.foundation.DataType
protected com.aquima.interactions.foundation.text.IMultilingualText
protected List
<GlobalParameterValueTemplate> protected com.aquima.interactions.foundation.text.IMultilingualText
protected String
protected List
<FieldValidationTemplate> protected boolean
void
setExplainText
(com.aquima.interactions.foundation.text.IMultilingualText text) This method may be used to override the explain text of the field.void
setExplainText
(String text) This method may be used to override the explain text of the field.void
setQuestionText
(com.aquima.interactions.foundation.text.IMultilingualText text) This method may be used to override the question text of the field.void
setQuestionText
(String text) This method may be used to override the question text of the field.void
setRequired
(boolean isRequired) This method may be used to specify if the field is required to be filled by the client.void
setRequiredCondition
(String condition) This method may be used to override the required condition of the reference.com.aquima.interactions.composer.ds.IFieldDS
This method converts the template to a data source that can be used to initialize a field definition.Methods inherited from class com.aquima.interactions.test.templates.composer.ElementTemplate
getName, getPresentationStyles
Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
FieldTemplate
protected FieldTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, AttributeTemplate attribute) -
FieldTemplate
protected FieldTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String fieldName)
-
-
Method Details
-
setRequired
public void setRequired(boolean isRequired) This method may be used to specify if the field is required to be filled by the client.- Parameters:
isRequired
- Boolean indicating if the field is required to be filled by the client.
-
getRequiredCondition
-
setRequiredCondition
This method may be used to override the required condition of the reference.- Parameters:
condition
- The required condition that should be used to determine if the field is required.
-
getQuestionText
protected com.aquima.interactions.foundation.text.IMultilingualText getQuestionText() -
setQuestionText
This method may be used to override the question text of the field.- Parameters:
text
- the question text of the field.
-
setQuestionText
public void setQuestionText(com.aquima.interactions.foundation.text.IMultilingualText text) This method may be used to override the question text of the field.- Parameters:
text
- the question text of the field.- Since:
- 8.4
-
getExplainText
protected com.aquima.interactions.foundation.text.IMultilingualText getExplainText() -
setExplainText
public void setExplainText(com.aquima.interactions.foundation.text.IMultilingualText text) This method may be used to override the explain text of the field.- Parameters:
text
- the explain text of the field.- Since:
- 8.4
-
setExplainText
This method may be used to override the explain text of the field.- Parameters:
text
- the explain text of the field.
-
isMultivalue
protected boolean isMultivalue() -
getDataType
protected com.aquima.interactions.foundation.DataType getDataType() -
addValidation
This method may be used to add a validation to the field.- Parameters:
type
- The type of the validation that should be added.- Returns:
- Template representing the newly added validation.
-
getValidations
-
addPrimitiveParameter
public GlobalParameterValueTemplate addPrimitiveParameter(String parameterName, com.aquima.interactions.foundation.DataType primitiveType, String expression) This method can be used to add a primitive parameter value to this field. A global parameter with the given name should be defined in the project, should be of primitive type and the primitive data type should match the given data type.- Parameters:
parameterName
- the name of the primitive parameterprimitiveType
- the data type of the primitive parameterexpression
- the expression used to obtain the value (should evaluate to the given data type)
-
addTextParameter
This method can be used to add a text parameter value to this field. A global parameter with the given name should be defined in the project and should be of type text. A content item with the given name should also be defined in the composer.- Parameters:
parameterName
- the name of the parametercontentItem
- the content item
-
getParameters
-
toDataSource
public com.aquima.interactions.composer.ds.IFieldDS toDataSource()This method converts the template to a data source that can be used to initialize a field definition.- Returns:
- a data source that can be used to initialize a field definition.
-