org.apache.camel.component.aws.ec2.EC2ComponentConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camel-aws-ec2 Show documentation
Show all versions of camel-aws-ec2 Show documentation
A Camel Amazon EC2 Web Service Component
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.aws.ec2;
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 EC2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
@Override
public boolean configure(CamelContext camelContext, Object component, String name, Object value, boolean ignoreCase) {
if (ignoreCase) {
return doConfigureIgnoreCase(camelContext, component, name, value);
} else {
return doConfigure(camelContext, component, name, value);
}
}
private static boolean doConfigure(CamelContext camelContext, Object component, String name, Object value) {
switch (name) {
case "configuration": ((EC2Component) component).setConfiguration(property(camelContext, org.apache.camel.component.aws.ec2.EC2Configuration.class, value)); return true;
case "region": ((EC2Component) component).setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "accessKey": ((EC2Component) component).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
case "secretKey": ((EC2Component) component).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
case "basicPropertyBinding": ((EC2Component) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object component, String name, Object value) {
switch (name.toLowerCase()) {
case "configuration": ((EC2Component) component).setConfiguration(property(camelContext, org.apache.camel.component.aws.ec2.EC2Configuration.class, value)); return true;
case "region": ((EC2Component) component).setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "accesskey": ((EC2Component) component).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
case "secretkey": ((EC2Component) component).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
case "basicpropertybinding": ((EC2Component) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy