Interface BackendIdConverter
- All Superinterfaces:
org.springframework.plugin.core.Plugin<Class<?>>
- All Known Implementing Classes:
BackendIdConverter.DefaultIdConverter
SPI to allow the customization of how entity ids are exposed in URIs generated.
- Author:
- Oliver Gierke
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The defaultBackendIdConverter
that will simply use ids as they are. -
Method Summary
Modifier and TypeMethodDescriptionfromRequestId
(String id, Class<?> entityType) Returns the id of the entity to be looked up eventually.toRequestId
(Serializable id, Class<?> entityType) Returns the id to be used in the URI generated to point to an entity of the given type with the given id.Methods inherited from interface org.springframework.plugin.core.Plugin
supports
-
Method Details
-
fromRequestId
Returns the id of the entity to be looked up eventually.- Parameters:
id
- the source id as it was parsed from the incoming request, will never be null.entityType
- the type of the object to be resolved, will never be null.- Returns:
- must not be null.
-
toRequestId
Returns the id to be used in the URI generated to point to an entity of the given type with the given id.- Parameters:
id
- the entity's id, will never be null.entityType
- the type of the entity to expose.- Returns:
-