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
ConstructorsConstructorDescriptionAnnotationBasedResourceDescription(Class<?> type, ResourceDescription fallback) AnnotationBasedResourceDescription(Description description, ResourceDescription fallback) Creates a newAnnotationBasedResourceDescriptionfor the givenDescriptionand fallback. -
Method Summary
Methods inherited from class org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport
getArguments, getDefaultMessage
-
Constructor Details
-
AnnotationBasedResourceDescription
Creates a newAnnotationBasedResourceDescriptionfor the givenDescriptionand fallback.- Parameters:
description- must not be null.fallback- must not be null.
-
AnnotationBasedResourceDescription
-
-
Method Details
-
getCodes
-
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
- Returns:
- the mediaType
-
isDefault
public boolean isDefault()Description copied from interface:ResourceDescriptionReturns whether this is the default description.- Returns:
-