Class IntegrationObjectRemoveInterceptor

java.lang.Object
de.hybris.platform.integrationservices.interceptor.IntegrationObjectRemoveInterceptor
All Implemented Interfaces:
Interceptor, RemoveInterceptor<IntegrationObjectModel>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class IntegrationObjectRemoveInterceptor extends Object implements RemoveInterceptor<IntegrationObjectModel>, org.springframework.context.ApplicationContextAware
Interceptor that prevents IntegrationObjectModel from being deleted if items of a certain type reference the Integration Object. If a user wants to prevent an Integration Object from being deleted when it is referenced by a certain type, implement the BeforeRemoveIntegrationObjectChecker for that type. Then add the implementation to the list in the spring configuration. For example

 <bean depends-on="beforeRemoveIntegrationObjectCheckers" parent="listMergeDirective">
     <property name="add" ref = "noOutboundChannelConfigBeforeRemoveIOChecker"/>
 </bean>
 

This interceptor calls BeforeRemoveIntegrationObjectChecker.checkIfIntegrationObjectInUse(de.hybris.platform.integrationservices.model.IntegrationObjectModel) of the checkers in the list. It will fail fast, meaning, it will stop at the first checker that throws the InterceptorException.

  • Constructor Details

    • IntegrationObjectRemoveInterceptor

      public IntegrationObjectRemoveInterceptor()
      Instantiates an IntegrationObjectRemoveInterceptor
    • IntegrationObjectRemoveInterceptor

      @Deprecated(since="22.02", forRemoval=true) public IntegrationObjectRemoveInterceptor(@NotNull @NotNull List<BeforeRemoveIntegrationObjectChecker> beforeRemoveIntegrationObjectCheckers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      to allow addition of more checkers into this interceptor configuration from custom extensions without escaping the reference to the list parameter. setApplicationContext(ApplicationContext) will automatically inject the checkers.
      Constructor
      Parameters:
      beforeRemoveIntegrationObjectCheckers - a list of typed checkers which check if there are any items of that type (eg. InboundChannelConfiguration , OutboundChannelConfiguration, WebhookConfiguration) that reference an Integration Object before removal.
  • Method Details