001/* Generated by camel build tools - do NOT edit this file! */
002package org.apache.camel.component.event;
003
004import java.util.Map;
005
006import org.apache.camel.CamelContext;
007import org.apache.camel.spi.GeneratedPropertyConfigurer;
008import org.apache.camel.spi.PropertyConfigurerGetter;
009import org.apache.camel.util.CaseInsensitiveMap;
010import org.apache.camel.support.component.PropertyConfigurerSupport;
011
012/**
013 * Generated by camel build tools - do NOT edit this file!
014 */
015@SuppressWarnings("unchecked")
016public class EventComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
017
018    private static final Map<String, Object> ALL_OPTIONS;
019    static {
020        Map<String, Object> map = new CaseInsensitiveMap();
021        map.put("bridgeErrorHandler", boolean.class);
022        map.put("lazyStartProducer", boolean.class);
023        map.put("basicPropertyBinding", boolean.class);
024        ALL_OPTIONS = map;
025    }
026
027    @Override
028    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
029        EventComponent target = (EventComponent) obj;
030        switch (ignoreCase ? name.toLowerCase() : name) {
031        case "basicpropertybinding":
032        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
033        case "bridgeerrorhandler":
034        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
035        case "lazystartproducer":
036        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
037        default: return false;
038        }
039    }
040
041    @Override
042    public Map<String, Object> getAllOptions(Object target) {
043        return ALL_OPTIONS;
044    }
045
046    @Override
047    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
048        EventComponent target = (EventComponent) obj;
049        switch (ignoreCase ? name.toLowerCase() : name) {
050        case "basicpropertybinding":
051        case "basicPropertyBinding": return target.isBasicPropertyBinding();
052        case "bridgeerrorhandler":
053        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
054        case "lazystartproducer":
055        case "lazyStartProducer": return target.isLazyStartProducer();
056        default: return null;
057        }
058    }
059}
060