Class CachingMappingDiscoverer
java.lang.Object
org.springframework.hateoas.server.core.CachingMappingDiscoverer
- All Implemented Interfaces:
MappingDiscoverer
Caching adapter of
MappingDiscoverer
.- Author:
- Michal Stochmialek, Oliver Drotbohm, RĂ©da Housni Alaoui
-
Method Summary
Modifier and TypeMethodDescriptiongetConsumes
(Method method) Returns theMediaType
s supported for consumption.getMapping
(Class<?> type) Returns the mapping associated with the given type.getMapping
(Class<?> type, Method method) Returns the mapping for the givenMethod
invoked on the given type.getMapping
(Method method) Returns the mapping associated with the givenMethod
.String[]
Returns the statically declared request parameters.getRequestMethod
(Class<?> type, Method method) Returns the HTTP verbs for the givenMethod
invoked on the given type.static CachingMappingDiscoverer
of
(MappingDiscoverer delegate) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.hateoas.server.core.MappingDiscoverer
getUriMapping, getUriMapping, getUriMapping
-
Method Details
-
of
-
getMapping
Description copied from interface:MappingDiscoverer
Returns the mapping associated with the given type.- Specified by:
getMapping
in interfaceMappingDiscoverer
- Parameters:
type
- must not be null.- Returns:
- the type-level mapping or null in case none is present.
-
getMapping
Description copied from interface:MappingDiscoverer
Returns the mapping associated with the givenMethod
. This will include the type-level mapping.- Specified by:
getMapping
in interfaceMappingDiscoverer
- Parameters:
method
- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
-
getMapping
Description copied from interface:MappingDiscoverer
Returns the mapping for the givenMethod
invoked on the given type. This can be used to calculate the mapping for a super type method being invoked on a sub-type with a type mapping.- Specified by:
getMapping
in interfaceMappingDiscoverer
- Parameters:
type
- must not be null.method
- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
-
getRequestMethod
Description copied from interface:MappingDiscoverer
Returns the HTTP verbs for the givenMethod
invoked on the given type. This can be used to build hypermedia templates.- Specified by:
getRequestMethod
in interfaceMappingDiscoverer
- Returns:
-
getConsumes
Description copied from interface:MappingDiscoverer
Returns theMediaType
s supported for consumption.- Specified by:
getConsumes
in interfaceMappingDiscoverer
- Parameters:
method
- must not be null.- Returns:
- can be null.
-
getParams
Description copied from interface:MappingDiscoverer
Returns the statically declared request parameters.- Specified by:
getParams
in interfaceMappingDiscoverer
- Parameters:
method
- must not be null.- Returns:
- the parameters of the mapped request, narrowing the primary mapping.
-