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

org.apache.camel.component.olingo2.Olingo2ComponentConfigurer Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.olingo2;

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!
 */
@SuppressWarnings("unchecked")
public class Olingo2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, ExtendedPropertyConfigurerGetter {

    private static final Map ALL_OPTIONS;
    static {
        Map map = new CaseInsensitiveMap();
        map.put("configuration", org.apache.camel.component.olingo2.Olingo2Configuration.class);
        map.put("connectTimeout", int.class);
        map.put("contentType", java.lang.String.class);
        map.put("entityProviderReadProperties", org.apache.olingo.odata2.api.ep.EntityProviderReadProperties.class);
        map.put("entityProviderWriteProperties", org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties.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.olingo2.Olingo2Configuration getOrCreateConfiguration(Olingo2Component target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.olingo2.Olingo2Configuration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        Olingo2Component target = (Olingo2Component) 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.olingo2.Olingo2Configuration.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 "entityproviderreadproperties":
        case "entityProviderReadProperties": getOrCreateConfiguration(target).setEntityProviderReadProperties(property(camelContext, org.apache.olingo.odata2.api.ep.EntityProviderReadProperties.class, value)); return true;
        case "entityproviderwriteproperties":
        case "entityProviderWriteProperties": getOrCreateConfiguration(target).setEntityProviderWriteProperties(property(camelContext, org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties.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.olingo2.Olingo2Configuration.class;
        case "connecttimeout":
        case "connectTimeout": return int.class;
        case "contenttype":
        case "contentType": return java.lang.String.class;
        case "entityproviderreadproperties":
        case "entityProviderReadProperties": return org.apache.olingo.odata2.api.ep.EntityProviderReadProperties.class;
        case "entityproviderwriteproperties":
        case "entityProviderWriteProperties": return org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties.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) {
        Olingo2Component target = (Olingo2Component) 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 "entityproviderreadproperties":
        case "entityProviderReadProperties": return getOrCreateConfiguration(target).getEntityProviderReadProperties();
        case "entityproviderwriteproperties":
        case "entityProviderWriteProperties": return getOrCreateConfiguration(target).getEntityProviderWriteProperties();
        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 - 2025 Weber Informatics LLC | Privacy Policy