Interface MappingDiscoverer
- All Known Implementing Classes:
AnnotationMappingDiscoverer
,CachingMappingDiscoverer
public interface MappingDiscoverer
Strategy interface to discover a URI mapping and related
Affordance
s for either a
given type or method.- Author:
- Oliver Gierke, Greg Turnquist, RĂ©da Housni Alaoui
-
Method Summary
Modifier and TypeMethodDescriptiongetConsumes
(Method method) Returns theMediaType
s supported for consumption.getMapping
(Class<?> type) Deprecated.getMapping
(Class<?> type, Method method) Deprecated.since 2.0, usegetUriMapping(Class, Method)
insteadgetMapping
(Method method) Deprecated.since 2.0, usegetUriMapping(Method)
insteadString[]
Returns the statically declared request parameters.getRequestMethod
(Class<?> type, Method method) Returns the HTTP verbs for the givenMethod
invoked on the given type.default UriMapping
getUriMapping
(Class<?> type) Returns the mapping associated with the given type.default UriMapping
getUriMapping
(Class<?> type, Method method) Returns the mapping for the givenMethod
invoked on the given type.default UriMapping
getUriMapping
(Method method) Returns the mapping associated with the givenMethod
.
-
Method Details
-
getMapping
Deprecated.since 2.0, prefergetUriMapping(Class)
Returns the mapping associated with the given type.- Parameters:
type
- must not be null.- Returns:
- the type-level mapping or null in case none is present.
-
getUriMapping
Returns the mapping associated with the given type.- Parameters:
type
- must not be null.- Returns:
- the type-level mapping or null in case none is present.
- Since:
- 2.0
-
getMapping
Deprecated.since 2.0, usegetUriMapping(Method)
insteadReturns the mapping associated with the givenMethod
. This will include the type-level mapping.- Parameters:
method
- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
-
getUriMapping
Returns the mapping associated with the givenMethod
. This will include the type-level mapping.- Parameters:
method
- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
- Since:
- 2.0
-
getMapping
Deprecated.since 2.0, usegetUriMapping(Class, Method)
insteadReturns 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.- 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.
-
getUriMapping
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.- 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.
- Since:
- 2.0
-
getRequestMethod
Returns the HTTP verbs for the givenMethod
invoked on the given type. This can be used to build hypermedia templates.- Parameters:
type
-method
-- Returns:
-
getConsumes
Returns theMediaType
s supported for consumption.- Parameters:
method
- must not be null.- Returns:
- can be null.
- Since:
- 1.3
-
getParams
Returns the statically declared request parameters.- Parameters:
method
- must not be null.- Returns:
- the parameters of the mapped request, narrowing the primary mapping.
- Since:
- 1.4
-
getUriMapping(Class)