Interface FieldDefinition


public interface FieldDefinition
FieldDefinition
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 Details

    • getType

      @NotNull @Valid @NotNull @Valid FieldType getType()
      Returns:
      type
    • getName

      @NotNull @NotNull String 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

      @NotNull @Valid @NotNull @Valid LocalizedString getLabel()
      Returns:
      label
    • getInputHint

      @NotNull @NotNull TextInputHint getInputHint()
      Returns:
      inputHint
    • setType

      void setType(FieldType type)
      set type
      Parameters:
      type - value to be set
    • setName

      void setName(String name)

      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

      void setLabel(LocalizedString label)
      set label
      Parameters:
      label - value to be set
    • setInputHint

      void setInputHint(TextInputHint inputHint)
      set inputHint
      Parameters:
      inputHint - value to be set
    • of

      static FieldDefinition of()
      factory method
      Returns:
      instance of FieldDefinition
    • of

      static FieldDefinition of(FieldDefinition template)
      factory method to create a shallow copy FieldDefinition
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static FieldDefinition deepCopy(@Nullable FieldDefinition template)
      factory method to create a deep copy of FieldDefinition
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static FieldDefinitionBuilder builder()
      builder factory method for FieldDefinition
      Returns:
      builder
    • builder

      static FieldDefinitionBuilder builder(FieldDefinition template)
      create builder for FieldDefinition instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withFieldDefinition

      default <T> T withFieldDefinition(Function<FieldDefinition,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<FieldDefinition> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference