Package org.springframework.hateoas
Interface AffordanceModel.InputPayloadMetadata
- All Superinterfaces:
AffordanceModel.PayloadMetadata
- Enclosing class:
- AffordanceModel
public static interface AffordanceModel.InputPayloadMetadata
extends AffordanceModel.PayloadMetadata
Payload metadata for incoming requests.
- Author:
- Oliver Drotbohm
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends AffordanceModel.PropertyMetadataConfigured<T> & AffordanceModel.Named>
TapplyTo
(T target) Deprecated.<T extends AffordanceModel.Named>
Tcustomize
(T target, Function<AffordanceModel.PropertyMetadata, T> customizer) from
(AffordanceModel.PayloadMetadata metadata) Returns the I18n codes to be used to resolve a name for the payload metadata.Returns theMediaType
that the payload requires.default MediaType
Returns the primaryMediaType
expected for the input.withMediaTypes
(List<MediaType> mediaType) Creates a newAffordanceModel.InputPayloadMetadata
with the givenMediaType
assigned.Methods inherited from interface org.springframework.hateoas.AffordanceModel.PayloadMetadata
getPropertyMetadata, getType, stream
-
Field Details
-
NONE
-
-
Method Details
-
from
-
applyTo
@Deprecated default <T extends AffordanceModel.PropertyMetadataConfigured<T> & AffordanceModel.Named> T applyTo(T target) Deprecated.since 1.3, prefer setting up the model types viaAffordanceModel.createProperties(BiFunction)
.Applies theAffordanceModel.InputPayloadMetadata
to the given target.- Type Parameters:
T
-- Parameters:
target
-- Returns:
-
customize
<T extends AffordanceModel.Named> T customize(T target, Function<AffordanceModel.PropertyMetadata, T> customizer) -
getI18nCodes
Returns the I18n codes to be used to resolve a name for the payload metadata.- Returns:
-
withMediaTypes
Creates a newAffordanceModel.InputPayloadMetadata
with the givenMediaType
assigned.- Parameters:
mediaType
- can be null.- Returns:
- will never be null.
- Since:
- 1.3
-
getMediaTypes
Returns theMediaType
that the payload requires.- Returns:
- will never be null.
- Since:
- 1.3
-
getPrimaryMediaType
Returns the primaryMediaType
expected for the input. That is, fromgetMediaTypes()
the first one, if available.- Returns:
- can be null.
-
AffordanceModel.createProperties(BiFunction)
.