Class InterceptorConfiguration

java.lang.Object
io.camunda.migrator.config.InterceptorConfiguration

@Configuration public class InterceptorConfiguration extends Object
Configuration class for managing interceptors from both Spring context and config data files.
  • Field Details

    • context

      @Autowired protected org.springframework.context.ApplicationContext context
    • migratorProperties

      @Autowired protected MigratorProperties migratorProperties
  • Constructor Details

    • InterceptorConfiguration

      public InterceptorConfiguration()
  • Method Details

    • configuredVariableInterceptors

      @Bean public List<VariableInterceptor> configuredVariableInterceptors()
      Creates a composite list of variable interceptors from both Spring context and config data files.
      Returns:
      List of configured variable interceptors
    • processUnifiedInterceptorConfiguration

      protected void processUnifiedInterceptorConfiguration(List<VariableInterceptor> contextInterceptors, List<InterceptorProperty> interceptorConfigs)
      Processes unified interceptor configuration that supports both custom interceptors and property-based configuration including the enabled property.
      Parameters:
      contextInterceptors - List of interceptors discovered from Spring context
      interceptorConfigs - List of interceptor configurations from config files
    • findExistingInterceptor

      protected VariableInterceptor findExistingInterceptor(List<VariableInterceptor> contextInterceptors, String className)
      Finds an existing interceptor in the context by class name.
      Parameters:
      contextInterceptors - List of interceptors in context
      className - Class name to search for
      Returns:
      The interceptor if found, null otherwise
    • handleInterceptorDisable

      protected void handleInterceptorDisable(List<VariableInterceptor> contextInterceptors, InterceptorProperty interceptorConfig)
      Handles disabling any interceptor (built-in, programmatically, or declarative) by removing it from the context.
      Parameters:
      contextInterceptors - List of context interceptors to modify
      interceptorConfig - Configuration for the interceptor to disable
    • registerCustomInterceptor

      protected void registerCustomInterceptor(List<VariableInterceptor> contextInterceptors, InterceptorProperty interceptorConfig)
      Registers a custom interceptor from configuration.
      Parameters:
      contextInterceptors - List of interceptors to add to
      interceptorConfig - Configuration for the custom interceptor
    • createInterceptorInstance

      protected VariableInterceptor createInterceptorInstance(InterceptorProperty interceptorProperty) throws Exception
      Creates a variable interceptor instance from the configuration.
      Parameters:
      interceptorProperty - Interceptor configuration
      Returns:
      VariableInterceptor instance
      Throws:
      Exception - if instantiation fails
    • applyProperties

      protected static <T> void applyProperties(T target, Map<String,Object> sourceMap, boolean ignoreUnknownFields)
    • byteArrayVariableValidator

      @Bean public ByteArrayVariableValidator byteArrayVariableValidator()
    • dateVariableTransformer

      @Bean public DateVariableTransformer dateVariableTransformer()
    • fileVariableValidator

      @Bean public FileVariableValidator fileVariableValidator()
    • nullVariableTransformer

      @Bean public NullVariableTransformer nullVariableTransformer()
    • objectJavaVariableValidator

      @Bean public ObjectJavaVariableValidator objectJavaVariableValidator()
    • objectJsonVariableTransformer

      @Bean public ObjectJsonVariableTransformer objectJsonVariableTransformer()
    • objectXmlVariableTransformer

      @Bean public ObjectXmlVariableTransformer objectXmlVariableTransformer()
    • primitiveVariableTransformer

      @Bean public PrimitiveVariableTransformer primitiveVariableTransformer()
    • spinJsonVariableTransformer

      @Bean public SpinJsonVariableTransformer spinJsonVariableTransformer()
    • spinXmlVariableTransformer

      @Bean public SpinXmlVariableTransformer spinXmlVariableTransformer()