public class TypedResourceDescription extends SimpleResourceDescription
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.DEFAULT_KEY_PREFIX, DEFAULT_MEDIA_TYPE| Modifier and Type | Method and Description |
|---|---|
static ResourceDescription |
defaultFor(String rel,
Class<?> type) |
static ResourceDescription |
defaultFor(String rel,
org.springframework.data.mapping.PersistentProperty<?> property) |
static ResourceDescription |
defaultFor(String rel,
String name,
Class<?> type) |
Object[] |
getArguments() |
String |
getDefaultMessage() |
defaultFor, getCodes, getMessage, getType, isDefaultpublic static ResourceDescription defaultFor(String rel, org.springframework.data.mapping.PersistentProperty<?> property)
public static ResourceDescription defaultFor(String rel, String name, Class<?> type)
public static ResourceDescription defaultFor(String rel, Class<?> type)
public Object[] getArguments()
getArguments in interface org.springframework.context.MessageSourceResolvablegetArguments in class ResolvableResourceDescriptionSupportpublic String getDefaultMessage()
getDefaultMessage in interface org.springframework.context.MessageSourceResolvablegetDefaultMessage in class ResolvableResourceDescriptionSupportCopyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.