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

org.apache.camel.component.lucene.LuceneEndpointConfigurer Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.lucene;

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 LuceneEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        LuceneEndpoint target = (LuceneEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "analyzer": target.getConfig().setAnalyzer(property(camelContext, org.apache.lucene.analysis.Analyzer.class, value)); return true;
        case "indexdir":
        case "indexDir": target.getConfig().setIndexDir(property(camelContext, java.io.File.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxhits":
        case "maxHits": target.getConfig().setMaxHits(property(camelContext, int.class, value)); return true;
        case "srcdir":
        case "srcDir": target.getConfig().setSrcDir(property(camelContext, java.io.File.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "analyzer": return org.apache.lucene.analysis.Analyzer.class;
        case "indexdir":
        case "indexDir": return java.io.File.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxhits":
        case "maxHits": return int.class;
        case "srcdir":
        case "srcDir": return java.io.File.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        LuceneEndpoint target = (LuceneEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "analyzer": return target.getConfig().getAnalyzer();
        case "indexdir":
        case "indexDir": return target.getConfig().getIndexDir();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxhits":
        case "maxHits": return target.getConfig().getMaxHits();
        case "srcdir":
        case "srcDir": return target.getConfig().getSrcDir();
        default: return null;
        }
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy