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
Fields -
Method Summary
Modifier and TypeMethodDescription<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.List<org.springframework.http.MediaType>
Returns theMediaType
that the payload requires.default @Nullable org.springframework.http.MediaType
Returns the primaryMediaType
expected for the input.withMediaTypes
(List<org.springframework.http.MediaType> mediaType) Creates a newAffordanceModel.InputPayloadMetadata
with the givenMediaType
assigned.Methods inherited from interface org.springframework.hateoas.AffordanceModel.PayloadMetadata
getType, stream
-
Field Details
-
NONE
-
-
Method Details
-
from
-
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
AffordanceModel.InputPayloadMetadata withMediaTypes(List<org.springframework.http.MediaType> mediaType) Creates a newAffordanceModel.InputPayloadMetadata
with the givenMediaType
assigned.- Parameters:
mediaType
- can be null.- Returns:
- will never be null.
- Since:
- 1.3
-
getMediaTypes
List<org.springframework.http.MediaType> getMediaTypes()Returns theMediaType
that the payload requires.- Returns:
- will never be null.
- Since:
- 1.3
-
getPrimaryMediaType
default @Nullable org.springframework.http.MediaType getPrimaryMediaType()Returns the primaryMediaType
expected for the input. That is, fromgetMediaTypes()
the first one, if available.- Returns:
- can be null.
-