Class SimpleResourceDescription
java.lang.Object
org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
org.springframework.data.rest.core.mapping.SimpleResourceDescription
- All Implemented Interfaces:
MessageSourceResolvable,ResourceDescription
- Direct Known Subclasses:
TypedResourceDescription
- Author:
- Oliver Gierke
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleResourceDescription(String message, MediaType mediaType) Creates a newSimpleResourceDescriptionwith the given message andMediaType. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceDescriptiondefaultFor(LinkRelation rel) String[]getCodes()Returns the description.getType()booleanReturns whether this is the default description.Methods inherited from class org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
getArguments, getDefaultMessage
-
Field Details
-
DEFAULT_KEY_PREFIX
- See Also:
-
DEFAULT_MEDIA_TYPE
-
-
Constructor Details
-
SimpleResourceDescription
Creates a newSimpleResourceDescriptionwith the given message andMediaType.- Parameters:
message- must not be null or empty.mediaType- must not be null or empty.
-
-
Method Details
-
defaultFor
-
getMessage
Description copied from interface:ResourceDescriptionReturns the description. This can be a message source code or a custom text format. Prefer resolving theResourceDescriptionusing aMessageSource.- Returns:
-
getType
-
isDefault
public boolean isDefault()Description copied from interface:ResourceDescriptionReturns whether this is the default description.- Returns:
-
getCodes
-