Interface SelfLinkProvider
- All Known Implementing Classes:
DefaultSelfLinkProvider
public interface SelfLinkProvider
Component to create self links for entity instances.
- Since:
- 2.5
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptioncreateSelfLinkFor
(Class<?> type, Object reference) Returns the self link for the entity of the given type and the given reference.createSelfLinkFor
(Object instance) Returns the self link for the given entity instance.
-
Method Details
-
createSelfLinkFor
Returns the self link for the given entity instance. Only call this with an actual entity instance. Otherwise, prefercreateSelfLinkFor(Class, Object)
.- Parameters:
instance
- must never be null.- Returns:
- will never be null.
- See Also:
-
createSelfLinkFor
Returns the self link for the entity of the given type and the given reference. The latter can be an instance of the former, an identifier value of the former or anything that can be converted into an identifier in the first place.- Parameters:
type
- must not be null.reference
- must not be null.- Returns:
- will never be null.
- Since:
- 3.5
-