org.apache.camel.component.servlet.ServletComponentConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camel-servlet Show documentation
Show all versions of camel-servlet Show documentation
Camel servlet transport support
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.servlet;
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 ServletComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
ServletComponent target = (ServletComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "allowjavaserializedobject":
case "allowJavaSerializedObject": target.setAllowJavaSerializedObject(property(camelContext, boolean.class, value)); return true;
case "attachmentmultipartbinding":
case "attachmentMultipartBinding": target.setAttachmentMultipartBinding(property(camelContext, boolean.class, value)); return true;
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 "filenameextwhitelist":
case "fileNameExtWhitelist": target.setFileNameExtWhitelist(property(camelContext, java.lang.String.class, value)); return true;
case "headerfilterstrategy":
case "headerFilterStrategy": target.setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
case "httpbinding":
case "httpBinding": target.setHttpBinding(property(camelContext, org.apache.camel.http.common.HttpBinding.class, value)); return true;
case "httpconfiguration":
case "httpConfiguration": target.setHttpConfiguration(property(camelContext, org.apache.camel.http.common.HttpConfiguration.class, value)); return true;
case "httpregistry":
case "httpRegistry": target.setHttpRegistry(property(camelContext, org.apache.camel.http.common.HttpRegistry.class, value)); return true;
case "muteexception":
case "muteException": target.setMuteException(property(camelContext, boolean.class, value)); return true;
case "servletname":
case "servletName": target.setServletName(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
}
}
@Override
public Class> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "allowjavaserializedobject":
case "allowJavaSerializedObject": return boolean.class;
case "attachmentmultipartbinding":
case "attachmentMultipartBinding": return boolean.class;
case "autowiredenabled":
case "autowiredEnabled": return boolean.class;
case "bridgeerrorhandler":
case "bridgeErrorHandler": return boolean.class;
case "filenameextwhitelist":
case "fileNameExtWhitelist": return java.lang.String.class;
case "headerfilterstrategy":
case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class;
case "httpbinding":
case "httpBinding": return org.apache.camel.http.common.HttpBinding.class;
case "httpconfiguration":
case "httpConfiguration": return org.apache.camel.http.common.HttpConfiguration.class;
case "httpregistry":
case "httpRegistry": return org.apache.camel.http.common.HttpRegistry.class;
case "muteexception":
case "muteException": return boolean.class;
case "servletname":
case "servletName": return java.lang.String.class;
default: return null;
}
}
@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
ServletComponent target = (ServletComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "allowjavaserializedobject":
case "allowJavaSerializedObject": return target.isAllowJavaSerializedObject();
case "attachmentmultipartbinding":
case "attachmentMultipartBinding": return target.isAttachmentMultipartBinding();
case "autowiredenabled":
case "autowiredEnabled": return target.isAutowiredEnabled();
case "bridgeerrorhandler":
case "bridgeErrorHandler": return target.isBridgeErrorHandler();
case "filenameextwhitelist":
case "fileNameExtWhitelist": return target.getFileNameExtWhitelist();
case "headerfilterstrategy":
case "headerFilterStrategy": return target.getHeaderFilterStrategy();
case "httpbinding":
case "httpBinding": return target.getHttpBinding();
case "httpconfiguration":
case "httpConfiguration": return target.getHttpConfiguration();
case "httpregistry":
case "httpRegistry": return target.getHttpRegistry();
case "muteexception":
case "muteException": return target.isMuteException();
case "servletname":
case "servletName": return target.getServletName();
default: return null;
}
}
}