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,
PersistentProperty<?> property) |
static ResourceDescription |
defaultFor(String rel,
String name,
Class<?> type) |
Object[] |
getArguments() |
String |
getDefaultMessage() |
defaultFor, getCodes, getMessage, getType, isDefault
public static ResourceDescription defaultFor(String rel, 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 MessageSourceResolvable
getArguments
in class ResolvableResourceDescriptionSupport
public String getDefaultMessage()
getDefaultMessage
in interface MessageSourceResolvable
getDefaultMessage
in class ResolvableResourceDescriptionSupport
Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.