Class PropertyMappingInterceptor

java.lang.Object
org.keycloak.quarkus.runtime.configuration.PropertyMappingInterceptor
All Implemented Interfaces:
io.smallrye.config.ConfigSourceInterceptor, Serializable

public class PropertyMappingInterceptor extends Object implements io.smallrye.config.ConfigSourceInterceptor

This interceptor is responsible for mapping Keycloak properties to their corresponding properties in Quarkus.

A single property in Keycloak may span a single or multiple properties on Quarkus and for each property we want to map from Quarkus we should configure a PropertyMapper.

The PropertyMapper can either perform a 1:1 mapping where the value of a property from Keycloak (e.g.: https.port) is mapped to a single properties in Quarkus, or perform a 1:N mapping where the value of a property from Keycloak (e.g.: database) is mapped to multiple properties in Quarkus.

This interceptor must execute after the ExpressionConfigSourceInterceptor so that expressions are properly resolved before executing this interceptor. Hence, leaving the default priority.

See Also:
  • Field Summary

    Fields inherited from interface io.smallrye.config.ConfigSourceInterceptor

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.config.ConfigValue
    getValue(io.smallrye.config.ConfigSourceInterceptorContext context, String name)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.smallrye.config.ConfigSourceInterceptor

    iterateNames, iterateValues
  • Constructor Details

    • PropertyMappingInterceptor

      public PropertyMappingInterceptor()
  • Method Details

    • getValue

      public io.smallrye.config.ConfigValue getValue(io.smallrye.config.ConfigSourceInterceptorContext context, String name)
      Specified by:
      getValue in interface io.smallrye.config.ConfigSourceInterceptor