Interface FieldDefinition
public interface FieldDefinition
FieldDefinition
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
FieldDefinition fieldDefinition = FieldDefinition.builder()
.type(typeBuilder -> typeBuilder)
.name("{name}")
.label(labelBuilder -> labelBuilder)
.inputHint(TextInputHint.SINGLE_LINE)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic FieldDefinitionBuilderbuilder()builder factory method for FieldDefinitionstatic FieldDefinitionBuilderbuilder(FieldDefinition template) create builder for FieldDefinition instancecopyDeep()static FieldDefinitiondeepCopy(FieldDefinition template) factory method to create a deep copy of FieldDefinition@NotNull TextInputHint@NotNull @Valid LocalizedStringgetLabel()@NotNull StringgetName()The name of the field.@NotNull @Valid FieldTypegetType()static FieldDefinitionof()factory methodstatic FieldDefinitionof(FieldDefinition template) factory method to create a shallow copy FieldDefinitionvoidsetInputHint(TextInputHint inputHint) set inputHintvoidsetLabel(LocalizedString label) set labelvoidThe name of the field.voidset typestatic com.fasterxml.jackson.core.type.TypeReference<FieldDefinition>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithFieldDefinition(Function<FieldDefinition, T> helper) accessor map function
-
Method Details
-
getType
- Returns:
- type
-
getName
The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (
_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.- Returns:
- name
-
getLabel
- Returns:
- label
-
getInputHint
- Returns:
- inputHint
-
setType
set type- Parameters:
type- value to be set
-
setName
The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (
_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.- Parameters:
name- value to be set
-
setLabel
set label- Parameters:
label- value to be set
-
setInputHint
set inputHint- Parameters:
inputHint- value to be set
-
of
factory method- Returns:
- instance of FieldDefinition
-
of
factory method to create a shallow copy FieldDefinition- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
FieldDefinition copyDeep() -
deepCopy
factory method to create a deep copy of FieldDefinition- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for FieldDefinition- Returns:
- builder
-
builder
create builder for FieldDefinition instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withFieldDefinition
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-