Class HalFormsOptions.AbstractHalFormsOptions<T extends HalFormsOptions.AbstractHalFormsOptions<T>>

java.lang.Object
org.springframework.hateoas.mediatype.hal.forms.HalFormsOptions.AbstractHalFormsOptions<T>
All Implemented Interfaces:
HalFormsOptions
Direct Known Subclasses:
HalFormsOptions.Inline, HalFormsOptions.Remote
Enclosing interface:
HalFormsOptions

public abstract static class HalFormsOptions.AbstractHalFormsOptions<T extends HalFormsOptions.AbstractHalFormsOptions<T>> extends Object implements HalFormsOptions
  • Constructor Details

    • AbstractHalFormsOptions

      protected AbstractHalFormsOptions(@Nullable String promptRef, @Nullable String valueRef, @Nullable Long minItems, @Nullable Long maxItems, @Nullable Object selectedValue)
  • Method Details

    • getPromptField

      public @Nullable String getPromptField()
      Description copied from interface: HalFormsOptions
      The field to look up the prompt from.
      Specified by:
      getPromptField in interface HalFormsOptions
      Returns:
    • getValueField

      public @Nullable String getValueField()
      Description copied from interface: HalFormsOptions
      The field to use as the value to be sent.
      Specified by:
      getValueField in interface HalFormsOptions
      Returns:
    • getMinItems

      public @Nullable Long getMinItems()
      Description copied from interface: HalFormsOptions
      Returns the minimum number of items to be selected.
      Specified by:
      getMinItems in interface HalFormsOptions
      Returns:
      null, 0 or a positive Long.
    • getMaxItems

      public @Nullable Long getMaxItems()
      Description copied from interface: HalFormsOptions
      Returns the maximum number of items to be selected.
      Specified by:
      getMaxItems in interface HalFormsOptions
      Returns:
      null or a positive Long.
    • getSelectedValue

      public @Nullable Object getSelectedValue()
      Specified by:
      getSelectedValue in interface HalFormsOptions
    • withPromptField

      public T withPromptField(String promptField)
      Configures the given field to be used as prompt field.
      Parameters:
      promptField - must either be null or actually have text.
      Returns:
    • withValueField

      public T withValueField(String valueField)
      Configures the given field to be used as value field.
      Parameters:
      valueField - must either be null or actually have text.
      Returns:
    • withMinItems

      public T withMinItems(Long minItems)
      Configures the minimum number of items to be selected.
      Parameters:
      minItems - must be null or greater than or equal to zero.
      Returns:
    • withMaxItems

      public T withMaxItems(@Nullable Long maxItems)
      Configures the maximum number of items to be selected.
      Parameters:
      maxItems - must be null or greater than zero.
      Returns:
    • withSelectedValue

      public T withSelectedValue(@Nullable Object value)
      Configured the value to be initially selected
      Parameters:
      value -
      Returns:
    • with

      protected abstract T with(@Nullable String promptRef, @Nullable String valueRef, @Nullable Long minItems, @Nullable Long maxItems, @Nullable Object selectedValue)
      Parameters:
      promptRef -
      valueRef -
      minItems -
      maxItems -
      Returns: