001/* Generated by org.apache.camel:apt */
002package org.apache.camel.component.event;
003
004import java.util.HashMap;
005import java.util.Map;
006
007import org.apache.camel.CamelContext;
008import org.apache.camel.spi.GeneratedPropertyConfigurer;
009import org.apache.camel.support.component.PropertyConfigurerSupport;
010
011/**
012 * Source code generated by org.apache.camel:apt
013 */
014@SuppressWarnings("unchecked")
015public class EventComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
016
017    @Override
018    public boolean configure(CamelContext camelContext, Object component, String name, Object value, boolean ignoreCase) {
019        if (ignoreCase) {
020            return doConfigureIgnoreCase(camelContext, component, name, value);
021        } else {
022            return doConfigure(camelContext, component, name, value);
023        }
024    }
025
026    private static boolean doConfigure(CamelContext camelContext, Object component, String name, Object value) {
027        switch (name) {
028        case "basicPropertyBinding": ((EventComponent) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
029        case "lazyStartProducer": ((EventComponent) component).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
030        case "bridgeErrorHandler": ((EventComponent) component).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
031            default: return false;
032        }
033    }
034
035    private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object component, String name, Object value) {
036        switch (name.toLowerCase()) {
037        case "basicpropertybinding": ((EventComponent) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
038        case "lazystartproducer": ((EventComponent) component).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
039        case "bridgeerrorhandler": ((EventComponent) component).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
040            default: return false;
041        }
042    }
043
044}
045