Class RemoveConsumedDestinationInterceptor
java.lang.Object
de.hybris.platform.apiregistryservices.interceptors.RemoveConsumedDestinationInterceptor
- All Implemented Interfaces:
Interceptor,RemoveInterceptor<ConsumedDestinationModel>
public class RemoveConsumedDestinationInterceptor
extends Object
implements RemoveInterceptor<ConsumedDestinationModel>
Interceptor to prevent Consumed Destination deletion
ConsumedDestinationModel
if it was assigned to WebhookConfiguration or OutboundChannelConfiguration.-
Constructor Summary
ConstructorsConstructorDescriptionRemoveConsumedDestinationInterceptor(@NotNull ConsumedDestinationVerifyUsageService consumedDestinationVerifyUsageService, @NotNull List<Map<String, String>> consumedDestinationPreventRemoveList) Constructor to create a RemoveConsumedDestinationInterceptor -
Method Summary
Modifier and TypeMethodDescriptionvoidonRemove(ConsumedDestinationModel consumedDestinationModel, InterceptorContext ctx) Called in themodelService.removeAll()method.
-
Constructor Details
-
RemoveConsumedDestinationInterceptor
public RemoveConsumedDestinationInterceptor(@NotNull @NotNull ConsumedDestinationVerifyUsageService consumedDestinationVerifyUsageService, @NotNull @NotNull List<Map<String, String>> consumedDestinationPreventRemoveList) Constructor to create a RemoveConsumedDestinationInterceptor- Parameters:
consumedDestinationVerifyUsageService- to search for item model that was assigned Consumed DestinationconsumedDestinationPreventRemoveList- to configure item model type code/destination attribute name and so on
-
-
Method Details
-
onRemove
public void onRemove(ConsumedDestinationModel consumedDestinationModel, InterceptorContext ctx) throws InterceptorException Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor<ConsumedDestinationModel>- Parameters:
consumedDestinationModel- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-