Interface HalFormsOptions
- All Known Implementing Classes:
HalFormsOptions.AbstractHalFormsOptions,HalFormsOptions.Inline,HalFormsOptions.Remote
public interface HalFormsOptions
Representation of HAL-FORMS
options attribute.- Since:
- 1.3
- Author:
- Oliver Drotbohm, Réda Housni Alaoui
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classRepresentation of a remote options element. -
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.static HalFormsOptions.Inlineinline(Collection<? extends Object> values) Creates a newHalFormsOptions.Inlineoptions representation listing the given collection of values.static <T> HalFormsOptions.Inlineinline(T... values) Creates a newHalFormsOptions.Inlineoptions representation listing the given values.static HalFormsOptions.RemoteCreates a newHalFormsOptions.Remoteoptions representation using the given href.static HalFormsOptions.RemoteCreates a newHalFormsOptions.Remoteoptions representation using the givenLink.
-
Method Details
-
inline
Creates a newHalFormsOptions.Inlineoptions representation listing the given values.- Parameters:
values- must not be null.- Returns:
- will never be null.
-
inline
Creates a newHalFormsOptions.Inlineoptions representation listing the given collection of values.- Parameters:
values- must not be null.- Returns:
- will never be null.
-
remote
Creates a newHalFormsOptions.Remoteoptions representation using the givenLink.- Parameters:
link- must not be null.- Returns:
- will never be null.
-
remote
Creates a newHalFormsOptions.Remoteoptions representation using the given href.- Parameters:
href- must not be null.- Returns:
- will never be null.
-
getPromptField
@Nullable String getPromptField()The field to look up the prompt from.- Returns:
-
getValueField
@Nullable String getValueField()The field to use as the value to be sent.- Returns:
-
getMinItems
@Nullable Long getMinItems()Returns the minimum number of items to be selected.- Returns:
- null, 0 or a positive
Long.
-
getMaxItems
@Nullable Long getMaxItems()Returns the maximum number of items to be selected.- Returns:
- null or a positive
Long.
-
getSelectedValue
@Nullable Object getSelectedValue()
-