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 theMediaTypethat the payload requires.default @Nullable org.springframework.http.MediaTypeReturns the primaryMediaTypeexpected for the input.withMediaTypes(List<org.springframework.http.MediaType> mediaType) Creates a newAffordanceModel.InputPayloadMetadatawith the givenMediaTypeassigned.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.InputPayloadMetadatawith the givenMediaTypeassigned.- Parameters:
mediaType- can be null.- Returns:
- will never be null.
- Since:
- 1.3
-
getMediaTypes
List<org.springframework.http.MediaType> getMediaTypes()Returns theMediaTypethat the payload requires.- Returns:
- will never be null.
- Since:
- 1.3
-
getPrimaryMediaType
default @Nullable org.springframework.http.MediaType getPrimaryMediaType()Returns the primaryMediaTypeexpected for the input. That is, fromgetMediaTypes()the first one, if available.- Returns:
- can be null.
-