Class AnnotationBasedResourceDescription
java.lang.Object
org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
org.springframework.data.rest.core.mapping.AnnotationBasedResourceDescription
- All Implemented Interfaces:
MessageSourceResolvable
,ResourceDescription
A
ResourceDescription
that is customized based on a Description
annotation. Allows to fall back on
another ResourceDescription
to provide defaults.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionAnnotationBasedResourceDescription
(Class<?> type, ResourceDescription fallback) AnnotationBasedResourceDescription
(Description description, ResourceDescription fallback) Creates a newAnnotationBasedResourceDescription
for the givenDescription
and fallback. -
Method Summary
Methods inherited from class org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
getArguments, getDefaultMessage
-
Constructor Details
-
AnnotationBasedResourceDescription
Creates a newAnnotationBasedResourceDescription
for the givenDescription
and fallback.- Parameters:
description
- must not be null.fallback
- must not be null.
-
AnnotationBasedResourceDescription
-
-
Method Details
-
getCodes
-
getMessage
Description copied from interface:ResourceDescription
Returns the description. This can be a message source code or a custom text format. Prefer resolving theResourceDescription
using aMessageSource
.- Returns:
-
getType
- Returns:
- the mediaType
-
isDefault
public boolean isDefault()Description copied from interface:ResourceDescription
Returns whether this is the default description.- Returns:
-