Class TypedResourceDescription
java.lang.Object
org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
org.springframework.data.rest.core.mapping.SimpleResourceDescription
org.springframework.data.rest.core.mapping.TypedResourceDescription
- All Implemented Interfaces:
MessageSourceResolvable
,ResourceDescription
SimpleResourceDescription
that additionally captures a type to be able to potentially create a reasonable
default message. The implementation will do so for enum types by rendering the available values as default message
and also provide them as arguments for message resolution.- Author:
- Oliver Gierke
-
Field Summary
Fields inherited from class org.springframework.data.rest.core.mapping.SimpleResourceDescription
DEFAULT_KEY_PREFIX, DEFAULT_MEDIA_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceDescription
defaultFor
(org.springframework.hateoas.LinkRelation rel, Class<?> type) static ResourceDescription
defaultFor
(org.springframework.hateoas.LinkRelation rel, String name, Class<?> type) static ResourceDescription
defaultFor
(org.springframework.hateoas.LinkRelation rel, PersistentProperty<?> property) Object[]
Methods inherited from class org.springframework.data.rest.core.mapping.SimpleResourceDescription
defaultFor, getCodes, getMessage, getType, isDefault
-
Method Details
-
defaultFor
public static ResourceDescription defaultFor(org.springframework.hateoas.LinkRelation rel, PersistentProperty<?> property) -
defaultFor
public static ResourceDescription defaultFor(org.springframework.hateoas.LinkRelation rel, String name, Class<?> type) -
defaultFor
public static ResourceDescription defaultFor(org.springframework.hateoas.LinkRelation rel, Class<?> type) -
getArguments
- Specified by:
getArguments
in interfaceMessageSourceResolvable
- Overrides:
getArguments
in classResolvableResourceDescriptionSupport
-
getDefaultMessage
- Specified by:
getDefaultMessage
in interfaceMessageSourceResolvable
- Overrides:
getDefaultMessage
in classResolvableResourceDescriptionSupport
-