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

org.apache.camel.component.linkedin.LinkedInEndpointConfigurer Maven / Gradle / Ivy

The newest version!
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.linkedin;

import java.util.HashMap;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
 * Source code generated by org.apache.camel:apt
 */
@SuppressWarnings("unchecked")
public class LinkedInEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {

    @Override
    public boolean configure(CamelContext camelContext, Object endpoint, String name, Object value, boolean ignoreCase) {
        if (ignoreCase) {
            return doConfigureIgnoreCase(camelContext, endpoint, name, value);
        } else {
            return doConfigure(camelContext, endpoint, name, value);
        }
    }

    private static boolean doConfigure(CamelContext camelContext, Object endpoint, String name, Object value) {
        switch (name) {
        case "userName": ((LinkedInEndpoint) endpoint).getConfiguration().setUserName(property(camelContext, java.lang.String.class, value)); return true;
        case "userPassword": ((LinkedInEndpoint) endpoint).getConfiguration().setUserPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "secureStorage": ((LinkedInEndpoint) endpoint).getConfiguration().setSecureStorage(property(camelContext, org.apache.camel.component.linkedin.api.OAuthSecureStorage.class, value)); return true;
        case "accessToken": ((LinkedInEndpoint) endpoint).getConfiguration().setAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "expiryTime": ((LinkedInEndpoint) endpoint).getConfiguration().setExpiryTime(property(camelContext, java.lang.Long.class, value)); return true;
        case "clientId": ((LinkedInEndpoint) endpoint).getConfiguration().setClientId(property(camelContext, java.lang.String.class, value)); return true;
        case "clientSecret": ((LinkedInEndpoint) endpoint).getConfiguration().setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
        case "scopes": ((LinkedInEndpoint) endpoint).getConfiguration().setScopes(property(camelContext, org.apache.camel.component.linkedin.api.OAuthScope[].class, value)); return true;
        case "redirectUri": ((LinkedInEndpoint) endpoint).getConfiguration().setRedirectUri(property(camelContext, java.lang.String.class, value)); return true;
        case "httpParams": ((LinkedInEndpoint) endpoint).getConfiguration().setHttpParams(property(camelContext, java.util.Map.class, value)); return true;
        case "lazyAuth": ((LinkedInEndpoint) endpoint).getConfiguration().setLazyAuth(property(camelContext, boolean.class, value)); return true;
        case "inBody": ((LinkedInEndpoint) endpoint).setInBody(property(camelContext, java.lang.String.class, value)); return true;
        case "startScheduler": ((LinkedInEndpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialDelay": ((LinkedInEndpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((LinkedInEndpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeUnit": ((LinkedInEndpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "useFixedDelay": ((LinkedInEndpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollStrategy": ((LinkedInEndpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runLoggingLevel": ((LinkedInEndpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendEmptyMessageWhenIdle": ((LinkedInEndpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((LinkedInEndpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((LinkedInEndpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerProperties": ((LinkedInEndpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledExecutorService": ((LinkedInEndpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffMultiplier": ((LinkedInEndpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffIdleThreshold": ((LinkedInEndpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backoffErrorThreshold": ((LinkedInEndpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "repeatCount": ((LinkedInEndpoint) endpoint).setRepeatCount(property(camelContext, long.class, value)); return true;
        case "lazyStartProducer": ((LinkedInEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeErrorHandler": ((LinkedInEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionHandler": ((LinkedInEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangePattern": ((LinkedInEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((LinkedInEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicPropertyBinding": ((LinkedInEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

    private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object endpoint, String name, Object value) {
        switch (name.toLowerCase()) {
        case "username": ((LinkedInEndpoint) endpoint).getConfiguration().setUserName(property(camelContext, java.lang.String.class, value)); return true;
        case "userpassword": ((LinkedInEndpoint) endpoint).getConfiguration().setUserPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "securestorage": ((LinkedInEndpoint) endpoint).getConfiguration().setSecureStorage(property(camelContext, org.apache.camel.component.linkedin.api.OAuthSecureStorage.class, value)); return true;
        case "accesstoken": ((LinkedInEndpoint) endpoint).getConfiguration().setAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "expirytime": ((LinkedInEndpoint) endpoint).getConfiguration().setExpiryTime(property(camelContext, java.lang.Long.class, value)); return true;
        case "clientid": ((LinkedInEndpoint) endpoint).getConfiguration().setClientId(property(camelContext, java.lang.String.class, value)); return true;
        case "clientsecret": ((LinkedInEndpoint) endpoint).getConfiguration().setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
        case "scopes": ((LinkedInEndpoint) endpoint).getConfiguration().setScopes(property(camelContext, org.apache.camel.component.linkedin.api.OAuthScope[].class, value)); return true;
        case "redirecturi": ((LinkedInEndpoint) endpoint).getConfiguration().setRedirectUri(property(camelContext, java.lang.String.class, value)); return true;
        case "httpparams": ((LinkedInEndpoint) endpoint).getConfiguration().setHttpParams(property(camelContext, java.util.Map.class, value)); return true;
        case "lazyauth": ((LinkedInEndpoint) endpoint).getConfiguration().setLazyAuth(property(camelContext, boolean.class, value)); return true;
        case "inbody": ((LinkedInEndpoint) endpoint).setInBody(property(camelContext, java.lang.String.class, value)); return true;
        case "startscheduler": ((LinkedInEndpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialdelay": ((LinkedInEndpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((LinkedInEndpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeunit": ((LinkedInEndpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "usefixeddelay": ((LinkedInEndpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollstrategy": ((LinkedInEndpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runlogginglevel": ((LinkedInEndpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendemptymessagewhenidle": ((LinkedInEndpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((LinkedInEndpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((LinkedInEndpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerproperties": ((LinkedInEndpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledexecutorservice": ((LinkedInEndpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffmultiplier": ((LinkedInEndpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffidlethreshold": ((LinkedInEndpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backofferrorthreshold": ((LinkedInEndpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "repeatcount": ((LinkedInEndpoint) endpoint).setRepeatCount(property(camelContext, long.class, value)); return true;
        case "lazystartproducer": ((LinkedInEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler": ((LinkedInEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionhandler": ((LinkedInEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern": ((LinkedInEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((LinkedInEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicpropertybinding": ((LinkedInEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy