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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the maximum number of items to be selected.Returns the minimum number of items to be selected.The field to look up the prompt from.The field to use as the value to be sent.protected abstract T
Create a new concreteHalFormsOptions.AbstractHalFormsOptions
withMaxItems
(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
(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:HalFormsOptions
The field to look up the prompt from.- Specified by:
getPromptField
in interfaceHalFormsOptions
- Returns:
-
getValueField
Description copied from interface:HalFormsOptions
The field to use as the value to be sent.- Specified by:
getValueField
in interfaceHalFormsOptions
- Returns:
-
getMinItems
Description copied from interface:HalFormsOptions
Returns the minimum number of items to be selected.- Specified by:
getMinItems
in interfaceHalFormsOptions
- Returns:
- null, 0 or a positive
Long
.
-
getMaxItems
Description copied from interface:HalFormsOptions
Returns the maximum number of items to be selected.- Specified by:
getMaxItems
in interfaceHalFormsOptions
- Returns:
- null or a positive
Long
.
-
getSelectedValue
- Specified by:
getSelectedValue
in 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:
-