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(String rel) |
String[] |
getCodes() |
String |
getMessage()
Returns the description.
|
MediaType |
getType() |
boolean |
isDefault()
Returns whether this is the default description.
|
getArguments, getDefaultMessage
public 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(String rel)
public String getMessage()
ResourceDescription
ResourceDescription
using a MessageSource
.public MediaType getType()
public boolean isDefault()
ResourceDescription
public String[] getCodes()
Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.