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 EventEndpointConfigurer 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("name", java.lang.String.class);
022        map.put("bridgeErrorHandler", boolean.class);
023        map.put("exceptionHandler", org.apache.camel.spi.ExceptionHandler.class);
024        map.put("exchangePattern", org.apache.camel.ExchangePattern.class);
025        map.put("lazyStartProducer", boolean.class);
026        map.put("basicPropertyBinding", boolean.class);
027        map.put("synchronous", boolean.class);
028        ALL_OPTIONS = map;
029    }
030
031    @Override
032    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
033        EventEndpoint target = (EventEndpoint) obj;
034        switch (ignoreCase ? name.toLowerCase() : name) {
035        case "basicpropertybinding":
036        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
037        case "bridgeerrorhandler":
038        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
039        case "exceptionhandler":
040        case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
041        case "exchangepattern":
042        case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
043        case "lazystartproducer":
044        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
045        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
046        default: return false;
047        }
048    }
049
050    @Override
051    public Map<String, Object> getAllOptions(Object target) {
052        return ALL_OPTIONS;
053    }
054
055    @Override
056    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
057        EventEndpoint target = (EventEndpoint) obj;
058        switch (ignoreCase ? name.toLowerCase() : name) {
059        case "basicpropertybinding":
060        case "basicPropertyBinding": return target.isBasicPropertyBinding();
061        case "bridgeerrorhandler":
062        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
063        case "exceptionhandler":
064        case "exceptionHandler": return target.getExceptionHandler();
065        case "exchangepattern":
066        case "exchangePattern": return target.getExchangePattern();
067        case "lazystartproducer":
068        case "lazyStartProducer": return target.isLazyStartProducer();
069        case "synchronous": return target.isSynchronous();
070        default: return null;
071        }
072    }
073}
074