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 Type
    Method
    Description
    createSelfLinkFor(Class<?> type, Object reference)
    Returns the self link for the entity of the given type and the given reference.
    Returns the self link for the given entity instance.
  • Method Details

    • createSelfLinkFor

      Link createSelfLinkFor(Object instance)
      Returns the self link for the given entity instance. Only call this with an actual entity instance. Otherwise, prefer createSelfLinkFor(Class, Object).
      Parameters:
      instance - must never be null.
      Returns:
      will never be null.
      See Also:
    • createSelfLinkFor

      Link createSelfLinkFor(Class<?> type, Object reference)
      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