org.apache.camel.component.rest.RestEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.rest;
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 RestEndpointConfigurer 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 "consumes": ((RestEndpoint) endpoint).setConsumes(property(camelContext, java.lang.String.class, value)); return true;
case "produces": ((RestEndpoint) endpoint).setProduces(property(camelContext, java.lang.String.class, value)); return true;
case "inType": ((RestEndpoint) endpoint).setInType(property(camelContext, java.lang.String.class, value)); return true;
case "outType": ((RestEndpoint) endpoint).setOutType(property(camelContext, java.lang.String.class, value)); return true;
case "routeId": ((RestEndpoint) endpoint).setRouteId(property(camelContext, java.lang.String.class, value)); return true;
case "description": ((RestEndpoint) endpoint).setDescription(property(camelContext, java.lang.String.class, value)); return true;
case "apiDoc": ((RestEndpoint) endpoint).setApiDoc(property(camelContext, java.lang.String.class, value)); return true;
case "host": ((RestEndpoint) endpoint).setHost(property(camelContext, java.lang.String.class, value)); return true;
case "queryParameters": ((RestEndpoint) endpoint).setQueryParameters(property(camelContext, java.lang.String.class, value)); return true;
case "bindingMode": ((RestEndpoint) endpoint).setBindingMode(property(camelContext, org.apache.camel.spi.RestConfiguration.RestBindingMode.class, value)); return true;
case "producerComponentName": ((RestEndpoint) endpoint).setProducerComponentName(property(camelContext, java.lang.String.class, value)); return true;
case "consumerComponentName": ((RestEndpoint) endpoint).setConsumerComponentName(property(camelContext, java.lang.String.class, value)); return true;
case "lazyStartProducer": ((RestEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((RestEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((RestEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((RestEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((RestEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((RestEndpoint) 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 "consumes": ((RestEndpoint) endpoint).setConsumes(property(camelContext, java.lang.String.class, value)); return true;
case "produces": ((RestEndpoint) endpoint).setProduces(property(camelContext, java.lang.String.class, value)); return true;
case "intype": ((RestEndpoint) endpoint).setInType(property(camelContext, java.lang.String.class, value)); return true;
case "outtype": ((RestEndpoint) endpoint).setOutType(property(camelContext, java.lang.String.class, value)); return true;
case "routeid": ((RestEndpoint) endpoint).setRouteId(property(camelContext, java.lang.String.class, value)); return true;
case "description": ((RestEndpoint) endpoint).setDescription(property(camelContext, java.lang.String.class, value)); return true;
case "apidoc": ((RestEndpoint) endpoint).setApiDoc(property(camelContext, java.lang.String.class, value)); return true;
case "host": ((RestEndpoint) endpoint).setHost(property(camelContext, java.lang.String.class, value)); return true;
case "queryparameters": ((RestEndpoint) endpoint).setQueryParameters(property(camelContext, java.lang.String.class, value)); return true;
case "bindingmode": ((RestEndpoint) endpoint).setBindingMode(property(camelContext, org.apache.camel.spi.RestConfiguration.RestBindingMode.class, value)); return true;
case "producercomponentname": ((RestEndpoint) endpoint).setProducerComponentName(property(camelContext, java.lang.String.class, value)); return true;
case "consumercomponentname": ((RestEndpoint) endpoint).setConsumerComponentName(property(camelContext, java.lang.String.class, value)); return true;
case "lazystartproducer": ((RestEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((RestEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((RestEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((RestEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((RestEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((RestEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy