org.apache.camel.component.ehcache.EhcacheEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.ehcache;
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 EhcacheEndpointConfigurer 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 "createCacheIfNotExist": ((EhcacheEndpoint) endpoint).getConfiguration().setCreateCacheIfNotExist(property(camelContext, boolean.class, value)); return true;
case "action": ((EhcacheEndpoint) endpoint).getConfiguration().setAction(property(camelContext, java.lang.String.class, value)); return true;
case "key": ((EhcacheEndpoint) endpoint).getConfiguration().setKey(property(camelContext, java.lang.Object.class, value)); return true;
case "cacheManager": ((EhcacheEndpoint) endpoint).getConfiguration().setCacheManager(property(camelContext, org.ehcache.CacheManager.class, value)); return true;
case "cacheManagerConfiguration": ((EhcacheEndpoint) endpoint).getConfiguration().setCacheManagerConfiguration(property(camelContext, org.ehcache.config.Configuration.class, value)); return true;
case "configurationUri": ((EhcacheEndpoint) endpoint).getConfiguration().setConfigurationUri(property(camelContext, java.lang.String.class, value)); return true;
case "configuration": ((EhcacheEndpoint) endpoint).getConfiguration().setConfiguration(property(camelContext, org.ehcache.config.CacheConfiguration.class, value)); return true;
case "configurations": ((EhcacheEndpoint) endpoint).getConfiguration().setConfigurations(property(camelContext, java.util.Map.class, value)); return true;
case "keyType": ((EhcacheEndpoint) endpoint).getConfiguration().setKeyType(property(camelContext, java.lang.String.class, value)); return true;
case "valueType": ((EhcacheEndpoint) endpoint).getConfiguration().setValueType(property(camelContext, java.lang.String.class, value)); return true;
case "eventOrdering": ((EhcacheEndpoint) endpoint).getConfiguration().setEventOrdering(property(camelContext, org.ehcache.event.EventOrdering.class, value)); return true;
case "eventFiring": ((EhcacheEndpoint) endpoint).getConfiguration().setEventFiring(property(camelContext, org.ehcache.event.EventFiring.class, value)); return true;
case "eventTypes": ((EhcacheEndpoint) endpoint).getConfiguration().setEventTypes(property(camelContext, java.util.Set.class, value)); return true;
case "lazyStartProducer": ((EhcacheEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((EhcacheEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((EhcacheEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((EhcacheEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((EhcacheEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((EhcacheEndpoint) 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 "createcacheifnotexist": ((EhcacheEndpoint) endpoint).getConfiguration().setCreateCacheIfNotExist(property(camelContext, boolean.class, value)); return true;
case "action": ((EhcacheEndpoint) endpoint).getConfiguration().setAction(property(camelContext, java.lang.String.class, value)); return true;
case "key": ((EhcacheEndpoint) endpoint).getConfiguration().setKey(property(camelContext, java.lang.Object.class, value)); return true;
case "cachemanager": ((EhcacheEndpoint) endpoint).getConfiguration().setCacheManager(property(camelContext, org.ehcache.CacheManager.class, value)); return true;
case "cachemanagerconfiguration": ((EhcacheEndpoint) endpoint).getConfiguration().setCacheManagerConfiguration(property(camelContext, org.ehcache.config.Configuration.class, value)); return true;
case "configurationuri": ((EhcacheEndpoint) endpoint).getConfiguration().setConfigurationUri(property(camelContext, java.lang.String.class, value)); return true;
case "configuration": ((EhcacheEndpoint) endpoint).getConfiguration().setConfiguration(property(camelContext, org.ehcache.config.CacheConfiguration.class, value)); return true;
case "configurations": ((EhcacheEndpoint) endpoint).getConfiguration().setConfigurations(property(camelContext, java.util.Map.class, value)); return true;
case "keytype": ((EhcacheEndpoint) endpoint).getConfiguration().setKeyType(property(camelContext, java.lang.String.class, value)); return true;
case "valuetype": ((EhcacheEndpoint) endpoint).getConfiguration().setValueType(property(camelContext, java.lang.String.class, value)); return true;
case "eventordering": ((EhcacheEndpoint) endpoint).getConfiguration().setEventOrdering(property(camelContext, org.ehcache.event.EventOrdering.class, value)); return true;
case "eventfiring": ((EhcacheEndpoint) endpoint).getConfiguration().setEventFiring(property(camelContext, org.ehcache.event.EventFiring.class, value)); return true;
case "eventtypes": ((EhcacheEndpoint) endpoint).getConfiguration().setEventTypes(property(camelContext, java.util.Set.class, value)); return true;
case "lazystartproducer": ((EhcacheEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((EhcacheEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((EhcacheEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((EhcacheEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((EhcacheEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((EhcacheEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy