public class SimpleResourceDescription extends ResolvableResourceDescriptionSupport
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_KEY_PREFIX |
protected static MediaType |
DEFAULT_MEDIA_TYPE |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleResourceDescription(String message,
MediaType mediaType)
Creates a new
SimpleResourceDescription with the given message and MediaType. |
| Modifier and Type | Method and Description |
|---|---|
static ResourceDescription |
defaultFor(org.springframework.hateoas.LinkRelation rel) |
String[] |
getCodes() |
String |
getMessage()
Returns the description.
|
MediaType |
getType() |
boolean |
isDefault()
Returns whether this is the default description.
|
getArguments, getDefaultMessagepublic static final String DEFAULT_KEY_PREFIX
protected static final MediaType DEFAULT_MEDIA_TYPE
protected SimpleResourceDescription(String message, MediaType mediaType)
SimpleResourceDescription with the given message and MediaType.message - must not be null or empty.mediaType - must not be null or empty.public static ResourceDescription defaultFor(org.springframework.hateoas.LinkRelation rel)
public String getMessage()
ResourceDescriptionResourceDescription using a MessageSource.public MediaType getType()
public boolean isDefault()
ResourceDescriptionpublic String[] getCodes()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.