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 FieldDefinitionBuilder
builder()
builder factory method for FieldDefinitionstatic FieldDefinitionBuilder
builder
(FieldDefinition template) create builder for FieldDefinition instancestatic FieldDefinition
deepCopy
(FieldDefinition template) factory method to create a deep copy of FieldDefinition@NotNull TextInputHint
@NotNull @Valid LocalizedString
getLabel()
@NotNull String
getName()
The name of the field.@NotNull @Valid FieldType
getType()
static FieldDefinition
of()
factory methodstatic FieldDefinition
of
(FieldDefinition template) factory method to create a shallow copy FieldDefinitionvoid
setInputHint
(TextInputHint inputHint) set inputHintvoid
setLabel
(LocalizedString label) set labelvoid
The name of the field.void
set typestatic com.fasterxml.jackson.core.type.TypeReference<FieldDefinition>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withFieldDefinition
(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
-
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
-