Interface BackendIdConverter

All Superinterfaces:
org.springframework.plugin.core.Plugin<Class<?>>
All Known Implementing Classes:
BackendIdConverter.DefaultIdConverter

public interface BackendIdConverter extends org.springframework.plugin.core.Plugin<Class<?>>
SPI to allow the customization of how entity ids are exposed in URIs generated.
Author:
Oliver Gierke
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The default BackendIdConverter that will simply use ids as they are.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromRequestId(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

      Serializable fromRequestId(String id, Class<?> entityType)
      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

      String 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.
      Parameters:
      id - the entity's id, will never be null.
      entityType - the type of the entity to expose.
      Returns: