All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.camel.component.olingo4.Olingo4ComponentConfigurer Maven / Gradle / Ivy

The newest version!
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.olingo4;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class Olingo4ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, ExtendedPropertyConfigurerGetter {

    private static final Map ALL_OPTIONS;
    static {
        Map map = new CaseInsensitiveMap();
        map.put("Configuration", org.apache.camel.component.olingo4.Olingo4Configuration.class);
        map.put("ConnectTimeout", int.class);
        map.put("ContentType", java.lang.String.class);
        map.put("FilterAlreadySeen", boolean.class);
        map.put("HttpHeaders", java.util.Map.class);
        map.put("Proxy", org.apache.http.HttpHost.class);
        map.put("ServiceUri", java.lang.String.class);
        map.put("SocketTimeout", int.class);
        map.put("BridgeErrorHandler", boolean.class);
        map.put("SplitResult", boolean.class);
        map.put("LazyStartProducer", boolean.class);
        map.put("AutowiredEnabled", boolean.class);
        map.put("HttpAsyncClientBuilder", org.apache.http.impl.nio.client.HttpAsyncClientBuilder.class);
        map.put("HttpClientBuilder", org.apache.http.impl.client.HttpClientBuilder.class);
        map.put("SslContextParameters", org.apache.camel.support.jsse.SSLContextParameters.class);
        map.put("UseGlobalSslContextParameters", boolean.class);
        ALL_OPTIONS = map;
    }

    private org.apache.camel.component.olingo4.Olingo4Configuration getOrCreateConfiguration(Olingo4Component target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.olingo4.Olingo4Configuration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        Olingo4Component target = (Olingo4Component) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.olingo4.Olingo4Configuration.class, value)); return true;
        case "connecttimeout":
        case "connectTimeout": getOrCreateConfiguration(target).setConnectTimeout(property(camelContext, int.class, value)); return true;
        case "contenttype":
        case "contentType": getOrCreateConfiguration(target).setContentType(property(camelContext, java.lang.String.class, value)); return true;
        case "filteralreadyseen":
        case "filterAlreadySeen": getOrCreateConfiguration(target).setFilterAlreadySeen(property(camelContext, boolean.class, value)); return true;
        case "httpasyncclientbuilder":
        case "httpAsyncClientBuilder": getOrCreateConfiguration(target).setHttpAsyncClientBuilder(property(camelContext, org.apache.http.impl.nio.client.HttpAsyncClientBuilder.class, value)); return true;
        case "httpclientbuilder":
        case "httpClientBuilder": getOrCreateConfiguration(target).setHttpClientBuilder(property(camelContext, org.apache.http.impl.client.HttpClientBuilder.class, value)); return true;
        case "httpheaders":
        case "httpHeaders": getOrCreateConfiguration(target).setHttpHeaders(property(camelContext, java.util.Map.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "proxy": getOrCreateConfiguration(target).setProxy(property(camelContext, org.apache.http.HttpHost.class, value)); return true;
        case "serviceuri":
        case "serviceUri": getOrCreateConfiguration(target).setServiceUri(property(camelContext, java.lang.String.class, value)); return true;
        case "sockettimeout":
        case "socketTimeout": getOrCreateConfiguration(target).setSocketTimeout(property(camelContext, int.class, value)); return true;
        case "splitresult":
        case "splitResult": getOrCreateConfiguration(target).setSplitResult(property(camelContext, boolean.class, value)); return true;
        case "sslcontextparameters":
        case "sslContextParameters": getOrCreateConfiguration(target).setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
        case "useglobalsslcontextparameters":
        case "useGlobalSslContextParameters": target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map getAllOptions(Object target) {
        return ALL_OPTIONS;
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "configuration": return org.apache.camel.component.olingo4.Olingo4Configuration.class;
        case "connecttimeout":
        case "connectTimeout": return int.class;
        case "contenttype":
        case "contentType": return java.lang.String.class;
        case "filteralreadyseen":
        case "filterAlreadySeen": return boolean.class;
        case "httpasyncclientbuilder":
        case "httpAsyncClientBuilder": return org.apache.http.impl.nio.client.HttpAsyncClientBuilder.class;
        case "httpclientbuilder":
        case "httpClientBuilder": return org.apache.http.impl.client.HttpClientBuilder.class;
        case "httpheaders":
        case "httpHeaders": return java.util.Map.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "proxy": return org.apache.http.HttpHost.class;
        case "serviceuri":
        case "serviceUri": return java.lang.String.class;
        case "sockettimeout":
        case "socketTimeout": return int.class;
        case "splitresult":
        case "splitResult": return boolean.class;
        case "sslcontextparameters":
        case "sslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
        case "useglobalsslcontextparameters":
        case "useGlobalSslContextParameters": return boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        Olingo4Component target = (Olingo4Component) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "configuration": return target.getConfiguration();
        case "connecttimeout":
        case "connectTimeout": return getOrCreateConfiguration(target).getConnectTimeout();
        case "contenttype":
        case "contentType": return getOrCreateConfiguration(target).getContentType();
        case "filteralreadyseen":
        case "filterAlreadySeen": return getOrCreateConfiguration(target).isFilterAlreadySeen();
        case "httpasyncclientbuilder":
        case "httpAsyncClientBuilder": return getOrCreateConfiguration(target).getHttpAsyncClientBuilder();
        case "httpclientbuilder":
        case "httpClientBuilder": return getOrCreateConfiguration(target).getHttpClientBuilder();
        case "httpheaders":
        case "httpHeaders": return getOrCreateConfiguration(target).getHttpHeaders();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "proxy": return getOrCreateConfiguration(target).getProxy();
        case "serviceuri":
        case "serviceUri": return getOrCreateConfiguration(target).getServiceUri();
        case "sockettimeout":
        case "socketTimeout": return getOrCreateConfiguration(target).getSocketTimeout();
        case "splitresult":
        case "splitResult": return getOrCreateConfiguration(target).isSplitResult();
        case "sslcontextparameters":
        case "sslContextParameters": return getOrCreateConfiguration(target).getSslContextParameters();
        case "useglobalsslcontextparameters":
        case "useGlobalSslContextParameters": return target.isUseGlobalSslContextParameters();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "httpheaders":
        case "httpHeaders": return java.lang.String.class;
        default: return null;
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy