Interface EntityTranslationApplier

All Superinterfaces:
org.springframework.core.Ordered

public interface EntityTranslationApplier extends org.springframework.core.Ordered

This is a mechanism that can be used to customize how Translation values are applied to entities in TranslationPostMapperMember.

TranslationPostMapperMember will delegate to the first EntityTranslationApplier it finds that can handle the given request. Otherwise, it will fall back to its default translation-applying logic.

Since:
TranslationCommon 2.0.5
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(Object projection, Translation translation)
    Whether the current component can handle applying the translation to the given entity.
    default int
     
    void
    handle(Object projection, Translation translation)
    Apply the translation on the given entity.
  • Method Details

    • canHandle

      boolean canHandle(Object projection, Translation translation)
      Whether the current component can handle applying the translation to the given entity.
      Parameters:
      projection - projection domain entity instance on which to apply the translation
      translation - a translation that needs to be applied to the given projection instance
      Returns:
      true if this component can handle the request, false otherwise
    • handle

      void handle(Object projection, Translation translation)
      Apply the translation on the given entity.
      Parameters:
      projection - projection domain entity instance on which to apply the translation
      translation - a translation that needs to be applied to the given projection instance
    • getOrder

      default int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered