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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.hateoas.mediatype.hal.forms.HalFormsOptions
HalFormsOptions.AbstractHalFormsOptions<T extends HalFormsOptions.AbstractHalFormsOptions<T>>, HalFormsOptions.Inline, HalFormsOptions.Remote -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable LongReturns the maximum number of items to be selected.@Nullable LongReturns the minimum number of items to be selected.@Nullable StringThe field to look up the prompt from.@Nullable Object@Nullable StringThe field to use as the value to be sent.protected abstract Twith(@Nullable String promptRef, @Nullable String valueRef, @Nullable Long minItems, @Nullable Long maxItems, @Nullable Object selectedValue) Create a new concreteHalFormsOptions.AbstractHalFormsOptionswithMaxItems(@Nullable Long maxItems) Configures the maximum number of items to be selected.withMinItems(Long minItems) Configures the minimum number of items to be selected.withPromptField(String promptField) Configures the given field to be used as prompt field.withSelectedValue(@Nullable Object value) Configured the value to be initially selectedwithValueField(String valueField) Configures the given field to be used as value field.
-
Constructor Details
-
AbstractHalFormsOptions
-
-
Method Details
-
getPromptField
Description copied from interface:HalFormsOptionsThe field to look up the prompt from.- Specified by:
getPromptFieldin interfaceHalFormsOptions- Returns:
-
getValueField
Description copied from interface:HalFormsOptionsThe field to use as the value to be sent.- Specified by:
getValueFieldin interfaceHalFormsOptions- Returns:
-
getMinItems
Description copied from interface:HalFormsOptionsReturns the minimum number of items to be selected.- Specified by:
getMinItemsin interfaceHalFormsOptions- Returns:
- null, 0 or a positive
Long.
-
getMaxItems
Description copied from interface:HalFormsOptionsReturns the maximum number of items to be selected.- Specified by:
getMaxItemsin interfaceHalFormsOptions- Returns:
- null or a positive
Long.
-
getSelectedValue
- Specified by:
getSelectedValuein interfaceHalFormsOptions
-
withPromptField
Configures the given field to be used as prompt field.- Parameters:
promptField- must either be null or actually have text.- Returns:
-
withValueField
Configures the given field to be used as value field.- Parameters:
valueField- must either be null or actually have text.- Returns:
-
withMinItems
Configures the minimum number of items to be selected.- Parameters:
minItems- must be null or greater than or equal to zero.- Returns:
-
withMaxItems
Configures the maximum number of items to be selected.- Parameters:
maxItems- must be null or greater than zero.- Returns:
-
withSelectedValue
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) Create a new concreteHalFormsOptions.AbstractHalFormsOptions- Parameters:
promptRef-valueRef-minItems-maxItems-- Returns:
-