/** * Intercepting PRE and POST interceptors. * * @param operation Operation name. * @param binder PropertyBinder. * @return ConsentInterceptorTemplate. */ public ConsentInterceptorTemplate<T, X> intercept(String operation, PropertyBinder binder) throws X { Map<String, Object> operationProperties = new HashMap<>(); binder.bind(operationProperties); if (result != null) { operationProperties.put(RESULT, result); } consentMgtInterceptors.forEach(rethrowConsumer(interceptor -> interceptor.intercept(new ConsentMessage (operation, operationProperties, context)))); return this; }