001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.spring;
018
019import java.util.ArrayList;
020import java.util.List;
021import java.util.Map;
022
023import javax.xml.bind.annotation.XmlAccessType;
024import javax.xml.bind.annotation.XmlAccessorType;
025import javax.xml.bind.annotation.XmlAttribute;
026import javax.xml.bind.annotation.XmlElement;
027import javax.xml.bind.annotation.XmlElements;
028import javax.xml.bind.annotation.XmlRootElement;
029import javax.xml.bind.annotation.XmlTransient;
030
031import org.apache.camel.CamelContext;
032import org.apache.camel.LoggingLevel;
033import org.apache.camel.RoutesBuilder;
034import org.apache.camel.RuntimeCamelException;
035import org.apache.camel.ShutdownRoute;
036import org.apache.camel.ShutdownRunningTask;
037import org.apache.camel.TypeConverterExists;
038import org.apache.camel.builder.RouteBuilder;
039import org.apache.camel.component.properties.PropertiesComponent;
040import org.apache.camel.core.xml.AbstractCamelContextFactoryBean;
041import org.apache.camel.core.xml.AbstractCamelFactoryBean;
042import org.apache.camel.core.xml.CamelJMXAgentDefinition;
043import org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition;
044import org.apache.camel.core.xml.CamelProxyFactoryDefinition;
045import org.apache.camel.core.xml.CamelRouteControllerDefinition;
046import org.apache.camel.core.xml.CamelServiceExporterDefinition;
047import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition;
048import org.apache.camel.model.ContextScanDefinition;
049import org.apache.camel.model.FaultToleranceConfigurationDefinition;
050import org.apache.camel.model.GlobalOptionsDefinition;
051import org.apache.camel.model.HystrixConfigurationDefinition;
052import org.apache.camel.model.InterceptDefinition;
053import org.apache.camel.model.InterceptFromDefinition;
054import org.apache.camel.model.InterceptSendToEndpointDefinition;
055import org.apache.camel.model.OnCompletionDefinition;
056import org.apache.camel.model.OnExceptionDefinition;
057import org.apache.camel.model.PackageScanDefinition;
058import org.apache.camel.model.Resilience4jConfigurationDefinition;
059import org.apache.camel.model.RestContextRefDefinition;
060import org.apache.camel.model.RouteBuilderDefinition;
061import org.apache.camel.model.RouteContextRefDefinition;
062import org.apache.camel.model.RouteDefinition;
063import org.apache.camel.model.ThreadPoolProfileDefinition;
064import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition;
065import org.apache.camel.model.dataformat.DataFormatsDefinition;
066import org.apache.camel.model.rest.RestConfigurationDefinition;
067import org.apache.camel.model.rest.RestDefinition;
068import org.apache.camel.model.transformer.TransformersDefinition;
069import org.apache.camel.model.validator.ValidatorsDefinition;
070import org.apache.camel.spi.Metadata;
071import org.apache.camel.spi.PackageScanFilter;
072import org.apache.camel.spi.Registry;
073import org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer;
074import org.apache.camel.spring.spi.XmlCamelContextConfigurer;
075import org.apache.camel.support.CamelContextHelper;
076import org.apache.camel.util.StopWatch;
077import org.slf4j.Logger;
078import org.slf4j.LoggerFactory;
079import org.springframework.beans.factory.DisposableBean;
080import org.springframework.beans.factory.FactoryBean;
081import org.springframework.beans.factory.InitializingBean;
082import org.springframework.beans.factory.config.BeanPostProcessor;
083import org.springframework.context.ApplicationContext;
084import org.springframework.context.ApplicationContextAware;
085import org.springframework.context.ApplicationListener;
086import org.springframework.context.Lifecycle;
087import org.springframework.context.Phased;
088import org.springframework.context.event.ContextRefreshedEvent;
089import org.springframework.core.Ordered;
090
091import static org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException;
092
093/**
094 * CamelContext using XML configuration.
095 */
096@Metadata(label = "spring,configuration")
097@XmlRootElement(name = "camelContext")
098@XmlAccessorType(XmlAccessType.FIELD)
099public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<SpringCamelContext>
100        implements FactoryBean<SpringCamelContext>, InitializingBean, DisposableBean, ApplicationContextAware, Lifecycle,
101        Phased, ApplicationListener<ContextRefreshedEvent>, Ordered {
102
103    private static final Logger LOG = LoggerFactory.getLogger(CamelContextFactoryBean.class);
104
105    @XmlAttribute(name = "depends-on") @Metadata(displayName = "Depends On")
106    private String dependsOn;
107    @XmlAttribute
108    private String trace;
109    @XmlAttribute
110    private String backlogTrace;
111    @XmlAttribute
112    private String tracePattern;
113    @XmlAttribute
114    private String debug;
115    @XmlAttribute @Metadata(defaultValue = "false")
116    private String messageHistory;
117    @XmlAttribute @Metadata(defaultValue = "false")
118    private String logMask;
119    @XmlAttribute
120    private String logExhaustedMessageBody;
121    @XmlAttribute
122    private String streamCache;
123    @XmlAttribute
124    private String delayer;
125    @XmlAttribute
126    private String errorHandlerRef;
127    @XmlAttribute @Metadata(defaultValue = "true")
128    private String autoStartup;
129    @XmlAttribute @Metadata(defaultValue = "true")
130    private String shutdownEager;
131    @XmlAttribute @Metadata(displayName = "Use MDC Logging")
132    private String useMDCLogging;
133    @XmlAttribute @Metadata(displayName = "MDC Logging Keys Pattern")
134    private String mdcLoggingKeysPattern;
135    @XmlAttribute
136    private String useDataType;
137    @XmlAttribute
138    private String useBreadcrumb;
139    @XmlAttribute
140    private String allowUseOriginalMessage;
141    @XmlAttribute
142    private String caseInsensitiveHeaders;
143    @XmlAttribute
144    private String runtimeEndpointRegistryEnabled;
145    @XmlAttribute @Metadata(defaultValue = "#name#")
146    private String managementNamePattern;
147    @XmlAttribute @Metadata(defaultValue = "Camel (#camelId#) thread ##counter# - #name#")
148    private String threadNamePattern;
149    @XmlAttribute @Metadata(defaultValue = "Default")
150    private ShutdownRoute shutdownRoute;
151    @XmlAttribute @Metadata(defaultValue = "CompleteCurrentTaskOnly")
152    private ShutdownRunningTask shutdownRunningTask;
153    @XmlAttribute @Metadata(defaultValue = "true")
154    private String loadTypeConverters;
155    @XmlAttribute
156    private String typeConverterStatisticsEnabled;
157    @XmlAttribute
158    private String inflightRepositoryBrowseEnabled;
159    @XmlAttribute @Metadata(defaultValue = "Override")
160    private TypeConverterExists typeConverterExists;
161    @XmlAttribute @Metadata(defaultValue = "WARN")
162    private LoggingLevel typeConverterExistsLoggingLevel;
163    @XmlElement(name = "globalOptions")
164    private GlobalOptionsDefinition globalOptions;
165    @XmlElement(name = "propertyPlaceholder", type = CamelPropertyPlaceholderDefinition.class)
166    private CamelPropertyPlaceholderDefinition camelPropertyPlaceholder;
167    @XmlElement(name = "package")
168    private String[] packages = {};
169    @XmlElement(name = "packageScan", type = PackageScanDefinition.class)
170    private PackageScanDefinition packageScan;
171    @XmlElement(name = "contextScan", type = ContextScanDefinition.class)
172    private ContextScanDefinition contextScan;
173    @XmlElement(name = "streamCaching", type = CamelStreamCachingStrategyDefinition.class)
174    private CamelStreamCachingStrategyDefinition camelStreamCachingStrategy;
175    @XmlElement(name = "jmxAgent", type = CamelJMXAgentDefinition.class) @Metadata(displayName = "JMX Agent")
176    private CamelJMXAgentDefinition camelJMXAgent;
177    @XmlElement(name = "routeController", type = CamelRouteControllerDefinition.class)
178    private CamelRouteControllerDefinition camelRouteController;
179    @XmlElements({
180            @XmlElement(name = "template", type = CamelProducerTemplateFactoryBean.class),
181            @XmlElement(name = "fluentTemplate", type = CamelFluentProducerTemplateFactoryBean.class),
182            @XmlElement(name = "consumerTemplate", type = CamelConsumerTemplateFactoryBean.class)})
183    private List<AbstractCamelFactoryBean<?>> beansFactory;
184    @XmlElements({
185        @XmlElement(name = "proxy", type = CamelProxyFactoryDefinition.class),
186        @XmlElement(name = "export", type = CamelServiceExporterDefinition.class),
187        @XmlElement(name = "errorHandler", type = ErrorHandlerDefinition.class) })
188    private List<?> beans;
189    @XmlElement(name = "defaultServiceCallConfiguration")
190    private ServiceCallConfigurationDefinition defaultServiceCallConfiguration;
191    @XmlElement(name = "serviceCallConfiguration", type = ServiceCallConfigurationDefinition.class)
192    private List<ServiceCallConfigurationDefinition> serviceCallConfigurations;
193    @XmlElement(name = "defaultHystrixConfiguration")
194    private HystrixConfigurationDefinition defaultHystrixConfiguration;
195    @XmlElement(name = "hystrixConfiguration", type = HystrixConfigurationDefinition.class)
196    private List<HystrixConfigurationDefinition> hystrixConfigurations;
197    @XmlElement(name = "defaultResilience4jConfiguration")
198    private Resilience4jConfigurationDefinition defaultResilience4jConfiguration;
199    @XmlElement(name = "resilience4jConfiguration", type = Resilience4jConfigurationDefinition.class)
200    private List<Resilience4jConfigurationDefinition> resilience4jConfigurations;
201    @XmlElement(name = "defaultFaultToleranceConfiguration")
202    private FaultToleranceConfigurationDefinition defaultFaultToleranceConfiguration;
203    @XmlElement(name = "faultToleranceConfiguration", type = Resilience4jConfigurationDefinition.class)
204    private List<FaultToleranceConfigurationDefinition> faultToleranceConfigurations;
205    @XmlElement(name = "routeBuilder")
206    private List<RouteBuilderDefinition> builderRefs = new ArrayList<>();
207    @XmlElement(name = "routeContextRef")
208    private List<RouteContextRefDefinition> routeRefs = new ArrayList<>();
209    @XmlElement(name = "restContextRef")
210    private List<RestContextRefDefinition> restRefs = new ArrayList<>();
211    @XmlElement(name = "threadPoolProfile")
212    private List<ThreadPoolProfileDefinition> threadPoolProfiles;
213    @XmlElement(name = "threadPool")
214    private List<CamelThreadPoolFactoryBean> threadPools;
215    @XmlElement(name = "endpoint")
216    private List<CamelEndpointFactoryBean> endpoints;
217    @XmlElement(name = "dataFormats")
218    private DataFormatsDefinition dataFormats;
219    @XmlElement(name = "transformers")
220    private TransformersDefinition transformers;
221    @XmlElement(name = "validators")
222    private ValidatorsDefinition validators;
223    @XmlElement(name = "redeliveryPolicyProfile")
224    private List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies;
225    @XmlElement(name = "onException")
226    private List<OnExceptionDefinition> onExceptions = new ArrayList<>();
227    @XmlElement(name = "onCompletion")
228    private List<OnCompletionDefinition> onCompletions = new ArrayList<>();
229    @XmlElement(name = "intercept")
230    private List<InterceptDefinition> intercepts = new ArrayList<>();
231    @XmlElement(name = "interceptFrom")
232    private List<InterceptFromDefinition> interceptFroms = new ArrayList<>();
233    @XmlElement(name = "interceptSendToEndpoint")
234    private List<InterceptSendToEndpointDefinition> interceptSendToEndpoints = new ArrayList<>();
235    @XmlElement(name = "restConfiguration")
236    private RestConfigurationDefinition restConfiguration;
237    @XmlElement(name = "rest")
238    private List<RestDefinition> rests = new ArrayList<>();
239    @XmlElement(name = "route")
240    private List<RouteDefinition> routes = new ArrayList<>();
241    @XmlTransient
242    private SpringCamelContext context;
243    @XmlTransient
244    private ClassLoader contextClassLoaderOnStart;
245    @XmlTransient
246    private ApplicationContext applicationContext;
247    @XmlTransient
248    private BeanPostProcessor beanPostProcessor;
249    @XmlTransient
250    private boolean implicitId;
251
252    @Override
253    public Class<SpringCamelContext> getObjectType() {
254        return SpringCamelContext.class;
255    }
256
257    @Override
258    protected <S> S getBeanForType(Class<S> clazz) {
259        S bean = null;
260        String[] names = getApplicationContext().getBeanNamesForType(clazz, true, true);
261        if (names.length == 1) {
262            bean = getApplicationContext().getBean(names[0], clazz);
263        }
264        if (bean == null) {
265            ApplicationContext parentContext = getApplicationContext().getParent();
266            if (parentContext != null) {
267                names = parentContext.getBeanNamesForType(clazz, true, true);
268                if (names.length == 1) {
269                    bean = parentContext.getBean(names[0], clazz);
270                }
271            }
272        }
273        return bean;
274    }
275
276    @Override
277    protected void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception {
278        // add filter to class resolver which then will filter
279        getContext().getPackageScanClassResolver().addFilter(filter);
280
281        PackageScanRouteBuilderFinder finder = new PackageScanRouteBuilderFinder(getContext(), packages, getContextClassLoaderOnStart(),
282                                                                                 getBeanPostProcessor(), getContext().getPackageScanClassResolver());
283        finder.appendBuilders(builders);
284
285        // and remove the filter
286        getContext().getPackageScanClassResolver().removeFilter(filter);
287    }
288
289    @Override
290    protected void findRouteBuildersByContextScan(PackageScanFilter filter, boolean includeNonSingletons, List<RoutesBuilder> builders) throws Exception {
291        ContextScanRouteBuilderFinder finder = new ContextScanRouteBuilderFinder(getContext(), filter, includeNonSingletons);
292        finder.appendBuilders(builders);
293    }
294
295    @Override
296    protected void initBeanPostProcessor(SpringCamelContext context) {
297        if (beanPostProcessor != null) {
298            if (beanPostProcessor instanceof ApplicationContextAware) {
299                ((ApplicationContextAware) beanPostProcessor).setApplicationContext(applicationContext);
300            }
301            if (beanPostProcessor instanceof CamelBeanPostProcessor) {
302                ((CamelBeanPostProcessor) beanPostProcessor).setCamelContext(getContext());
303            }
304            // register the bean post processor on camel context
305            if (beanPostProcessor instanceof org.apache.camel.spi.CamelBeanPostProcessor) {
306                context.setBeanPostProcessor((org.apache.camel.spi.CamelBeanPostProcessor) beanPostProcessor);
307            }
308        }
309    }
310
311    @Override
312    protected void postProcessBeforeInit(RouteBuilder builder) {
313        if (beanPostProcessor != null) {
314            // Inject the annotated resource
315            beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
316        }
317    }
318
319    @Override
320    public void afterPropertiesSet() throws Exception {
321        StopWatch watch = new StopWatch();
322
323        super.afterPropertiesSet();
324
325        Boolean shutdownEager = CamelContextHelper.parseBoolean(getContext(), getShutdownEager());
326        if (shutdownEager != null) {
327            LOG.debug("Using shutdownEager: {}", shutdownEager);
328            getContext().setShutdownEager(shutdownEager);
329        }
330
331        LOG.debug("afterPropertiesSet() took {} millis", watch.taken());
332    }
333
334    @Override
335    protected void initCustomRegistry(SpringCamelContext context) {
336        Registry registry = getBeanForType(Registry.class);
337        if (registry != null) {
338            LOG.info("Using custom Registry: {}", registry);
339            context.setRegistry(registry);
340        }
341    }
342
343    @Override
344    protected void initPropertyPlaceholder() throws Exception {
345        super.initPropertyPlaceholder();
346
347        Map<String, BridgePropertyPlaceholderConfigurer> beans = applicationContext.getBeansOfType(BridgePropertyPlaceholderConfigurer.class);
348        if (beans.size() == 1) {
349            // setup properties component that uses this beans
350            BridgePropertyPlaceholderConfigurer configurer = beans.values().iterator().next();
351            String id = beans.keySet().iterator().next();
352            LOG.info("Bridging Camel and Spring property placeholder configurer with id: {}", id);
353
354            // get properties component
355            PropertiesComponent pc = (PropertiesComponent) getContext().getPropertiesComponent();
356            // use the spring system properties mode which has a different value than Camel may have
357            pc.setSystemPropertiesMode(configurer.getSystemPropertiesMode());
358
359            // replace existing resolver with us
360            configurer.setParser(pc.getPropertiesParser());
361            // use the bridge to handle the resolve and parsing
362            pc.setPropertiesParser(configurer);
363            // use the bridge as property source
364            pc.addPropertiesSource(configurer);
365
366        } else if (beans.size() > 1) {
367            LOG.warn("Cannot bridge Camel and Spring property placeholders, as exact only 1 bean of type BridgePropertyPlaceholderConfigurer"
368                    + " must be defined, was {} beans defined.", beans.size());
369        }
370    }
371
372    @Override
373    public void start() {
374        try {
375            setupRoutes();
376        } catch (Exception e) {
377            throw wrapRuntimeCamelException(e);
378        }
379
380        // when the routes are setup we need to start the Camel context
381        context.start();
382    }
383
384    @Override
385    public void stop() {
386        if (context != null) {
387            context.stop();
388        }
389    }
390
391    @Override
392    public boolean isRunning() {
393        return context != null && context.isRunning();
394    }
395
396    @Override
397    public int getPhase() {
398        // the factory starts the context from
399        // onApplicationEvent(ContextRefreshedEvent) so the phase we're
400        // in only influences when the context is to be stopped, and
401        // we want the CamelContext to be first in line to get stopped
402        // if we wanted the phase to be considered while starting, we
403        // would need to implement SmartLifecycle (see
404        // DefaultLifecycleProcessor::startBeans)
405        // we use LOWEST_PRECEDENCE here as this is taken into account
406        // only when stopping and then in reversed order
407        return LOWEST_PRECEDENCE - 1;
408    }
409
410    @Override
411    public int getOrder() {
412        // CamelContextFactoryBean implements Ordered so that it's the 
413        // second to last in ApplicationListener to receive events,
414        // SpringCamelContext should be the last one, this is important
415        // for startup as we want all resources to be ready and all
416        // routes added to the context (see setupRoutes() and
417        // org.apache.camel.spring.boot.RoutesCollector)
418        return LOWEST_PRECEDENCE - 1;
419    }
420
421    @Override
422    public void onApplicationEvent(final ContextRefreshedEvent event) {
423        // start the CamelContext when the Spring ApplicationContext is
424        // done initializing, as the last step in ApplicationContext
425        // being started/refreshed, there could be a race condition with
426        // other ApplicationListeners that react to
427        // ContextRefreshedEvent but this is the best that we can do
428        start();
429    }
430
431    // Properties
432    // -------------------------------------------------------------------------
433
434    public ApplicationContext getApplicationContext() {
435        if (applicationContext == null) {
436            throw new IllegalArgumentException("No applicationContext has been injected!");
437        }
438        return applicationContext;
439    }
440
441    @Override
442    public void setApplicationContext(ApplicationContext applicationContext) {
443        this.applicationContext = applicationContext;
444    }
445
446    public void setBeanPostProcessor(BeanPostProcessor postProcessor) {
447        this.beanPostProcessor = postProcessor;
448    }
449
450    public BeanPostProcessor getBeanPostProcessor() {
451        return beanPostProcessor;
452    }
453
454    // Implementation methods
455    // -------------------------------------------------------------------------
456
457    /**
458     * Create the context
459     */
460    protected SpringCamelContext createContext() {
461        SpringCamelContext ctx = newCamelContext();
462        ctx.setName(getId());
463
464        return ctx;
465    }
466
467    /**
468     * Apply additional configuration to the context
469     */
470    protected void configure(SpringCamelContext ctx) {
471        try {
472            // allow any custom configuration, such as when running in camel-spring-boot
473            if (applicationContext.containsBean("xmlCamelContextConfigurer")) {
474                XmlCamelContextConfigurer configurer = applicationContext.getBean("xmlCamelContextConfigurer", XmlCamelContextConfigurer.class);
475                if (configurer != null) {
476                    configurer.configure(applicationContext, ctx);
477                }
478            }
479        } catch (Exception e) {
480            // error during configuration
481            throw RuntimeCamelException.wrapRuntimeCamelException(e);
482        }
483    }
484
485    protected SpringCamelContext newCamelContext() {
486        return new SpringCamelContext(getApplicationContext());
487    }
488
489    @Override
490    public SpringCamelContext getContext(boolean create) {
491        if (context == null && create) {
492            context = createContext();
493            configure(context);
494            context.build();
495        }
496        return context;
497    }
498
499    public void setContext(SpringCamelContext context) {
500        this.context = context;
501    }
502
503    @Override
504    public List<RouteDefinition> getRoutes() {
505        return routes;
506    }
507
508    /**
509     * Contains the Camel routes
510     */
511    @Override
512    public void setRoutes(List<RouteDefinition> routes) {
513        this.routes = routes;
514    }
515
516    @Override
517    public List<RestDefinition> getRests() {
518        return rests;
519    }
520
521    /**
522     * Contains the rest services defined using the rest-dsl
523     */
524    @Override
525    public void setRests(List<RestDefinition> rests) {
526        this.rests = rests;
527    }
528
529    @Override
530    public RestConfigurationDefinition getRestConfiguration() {
531        return restConfiguration;
532    }
533
534    /**
535     * Configuration for rest-dsl
536     */
537    public void setRestConfiguration(RestConfigurationDefinition restConfiguration) {
538        this.restConfiguration = restConfiguration;
539    }
540
541    @Override
542    public List<CamelEndpointFactoryBean> getEndpoints() {
543        return endpoints;
544    }
545
546    /**
547     * Configuration of endpoints
548     */
549    public void setEndpoints(List<CamelEndpointFactoryBean> endpoints) {
550        this.endpoints = endpoints;
551    }
552
553    @Override
554    public List<CamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies() {
555        return redeliveryPolicies;
556    }
557
558    @Override
559    public List<InterceptDefinition> getIntercepts() {
560        return intercepts;
561    }
562
563    /**
564     * Configuration of interceptors.
565     */
566    public void setIntercepts(List<InterceptDefinition> intercepts) {
567        this.intercepts = intercepts;
568    }
569
570    @Override
571    public List<InterceptFromDefinition> getInterceptFroms() {
572        return interceptFroms;
573    }
574
575    /**
576     * Configuration of interceptors that triggers from the beginning of routes.
577     */
578    public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms) {
579        this.interceptFroms = interceptFroms;
580    }
581
582    @Override
583    public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints() {
584        return interceptSendToEndpoints;
585    }
586
587    /**
588     * Configuration of interceptors that triggers sending messages to endpoints.
589     */
590    public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints) {
591        this.interceptSendToEndpoints = interceptSendToEndpoints;
592    }
593
594    @Override
595    public GlobalOptionsDefinition getGlobalOptions() {
596        return globalOptions;
597    }
598
599    /**
600     * Configuration of CamelContext properties such as limit of debug logging
601     * and other general options.
602     */
603    public void setGlobalOptions(GlobalOptionsDefinition globalOptions) {
604        this.globalOptions = globalOptions;
605    }
606
607    @Override
608    public String[] getPackages() {
609        return packages;
610    }
611
612    /**
613     * Sets the package names to be recursively searched for Java classes which
614     * extend {@link org.apache.camel.builder.RouteBuilder} to be auto-wired up to the
615     * {@link CamelContext} as a route. Note that classes are excluded if
616     * they are specifically configured in the spring.xml
617     * <p/>
618     * A more advanced configuration can be done using {@link #setPackageScan(org.apache.camel.model.PackageScanDefinition)}
619     *
620     * @param packages the package names which are recursively searched
621     * @see #setPackageScan(org.apache.camel.model.PackageScanDefinition)
622     */
623    public void setPackages(String[] packages) {
624        this.packages = packages;
625    }
626
627    @Override
628    public PackageScanDefinition getPackageScan() {
629        return packageScan;
630    }
631
632    /**
633     * Sets the package scanning information. Package scanning allows for the
634     * automatic discovery of certain camel classes at runtime for inclusion
635     * e.g. {@link org.apache.camel.builder.RouteBuilder} implementations
636     *
637     * @param packageScan the package scan
638     */
639    @Override
640    public void setPackageScan(PackageScanDefinition packageScan) {
641        this.packageScan = packageScan;
642    }
643
644    @Override
645    public ContextScanDefinition getContextScan() {
646        return contextScan;
647    }
648
649    /**
650     * Sets the context scanning (eg Spring's ApplicationContext) information.
651     * Context scanning allows for the automatic discovery of Camel routes runtime for inclusion
652     * e.g. {@link org.apache.camel.builder.RouteBuilder} implementations
653     *
654     * @param contextScan the context scan
655     */
656    @Override
657    public void setContextScan(ContextScanDefinition contextScan) {
658        this.contextScan = contextScan;
659    }
660
661    @Override
662    public CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder() {
663        return camelPropertyPlaceholder;
664    }
665
666    /**
667     * Configuration of property placeholder
668     */
669    public void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder) {
670        this.camelPropertyPlaceholder = camelPropertyPlaceholder;
671    }
672
673    @Override
674    public CamelStreamCachingStrategyDefinition getCamelStreamCachingStrategy() {
675        return camelStreamCachingStrategy;
676    }
677
678    /**
679     * Configuration of stream caching.
680     */
681    public void setCamelStreamCachingStrategy(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) {
682        this.camelStreamCachingStrategy = camelStreamCachingStrategy;
683    }
684
685    @Override
686    public CamelRouteControllerDefinition getCamelRouteController() {
687        return camelRouteController;
688    }
689
690    /**
691     * Configuration of route controller.
692     */
693    public void setCamelRouteController(CamelRouteControllerDefinition camelRouteController) {
694        this.camelRouteController = camelRouteController;
695    }
696
697    /**
698     * Configuration of JMX Agent.
699     */
700    public void setCamelJMXAgent(CamelJMXAgentDefinition agent) {
701        camelJMXAgent = agent;
702    }
703
704    @Override
705    public String getTrace() {
706        return trace;
707    }
708
709    /**
710     * Sets whether tracing is enabled or not.
711     *
712     * To use tracing then this must be enabled on startup to be installed in the CamelContext.
713     */
714    public void setTrace(String trace) {
715        this.trace = trace;
716    }
717
718    @Override
719    public String getBacklogTrace() {
720        return backlogTrace;
721    }
722
723    /**
724     * Sets whether backlog tracing is enabled or not.
725     *
726     * To use backlog tracing then this must be enabled on startup to be installed in the CamelContext.
727     */
728    public void setBacklogTrace(String backlogTrace) {
729        this.backlogTrace = backlogTrace;
730    }
731
732    @Override
733    public String getDebug() {
734        return debug;
735    }
736
737    /**
738     * Sets whether debugging is enabled or not.
739     *
740     * To use debugging then this must be enabled on startup to be installed in the CamelContext.
741     */
742    public void setDebug(String debug) {
743        this.debug = debug;
744    }
745
746    @Override
747    public String getTracePattern() {
748        return tracePattern;
749    }
750
751    /**
752     * Tracing pattern to match which node EIPs to trace.
753     * For example to match all To EIP nodes, use to*.
754     * The pattern matches by node and route id's
755     * Multiple patterns can be separated by comma.
756     */
757    public void setTracePattern(String tracePattern) {
758        this.tracePattern = tracePattern;
759    }
760
761    @Override
762    public String getMessageHistory() {
763        return messageHistory;
764    }
765
766    /**
767     * Sets whether message history is enabled or not.
768     */
769    public void setMessageHistory(String messageHistory) {
770        this.messageHistory = messageHistory;
771    }
772
773    @Override
774    public String getLogMask() {
775        return logMask;
776    }
777
778    /**
779     * Sets whether security mask for Logging is enabled or not.
780     */
781    public void setLogMask(String logMask) {
782        this.logMask = logMask;
783    }
784
785    @Override
786    public String getLogExhaustedMessageBody() {
787        return logExhaustedMessageBody;
788    }
789
790    /**
791     * Sets whether to log exhausted message body with message history.
792     */
793    public void setLogExhaustedMessageBody(String logExhaustedMessageBody) {
794        this.logExhaustedMessageBody = logExhaustedMessageBody;
795    }
796
797    @Override
798    public String getStreamCache() {
799        return streamCache;
800    }
801
802    /**
803     * Sets whether stream caching is enabled or not.
804     */
805    public void setStreamCache(String streamCache) {
806        this.streamCache = streamCache;
807    }
808
809    @Override
810    public String getDelayer() {
811        return delayer;
812    }
813
814    /**
815     * Sets a delay value in millis that a message is delayed at every step it takes in the route path,
816     * slowing the process down to better observe what is occurring
817     */
818    public void setDelayer(String delayer) {
819        this.delayer = delayer;
820    }
821
822    @Override
823    public String getAutoStartup() {
824        return autoStartup;
825    }
826
827    /**
828     * Sets whether the object should automatically start when Camel starts.
829     * <p/>
830     * <b>Important:</b> Currently only routes can be disabled, as {@link CamelContext}s are always started.
831     * <br/>
832     * <b>Note:</b> When setting auto startup <tt>false</tt> on {@link CamelContext} then that takes precedence
833     * and <i>no</i> routes is started. You would need to start {@link CamelContext} explicit using
834     * the {@link org.apache.camel.CamelContext#start()} method, to start the context, and then
835     * you would need to start the routes manually using {@link org.apache.camel.spi.RouteController#startRoute(String)}.
836     */
837    public void setAutoStartup(String autoStartup) {
838        this.autoStartup = autoStartup;
839    }
840
841    public String getShutdownEager() {
842        return shutdownEager;
843    }
844
845    /**
846     * Whether to shutdown CamelContext eager when Spring is shutting down.
847     * This ensure a cleaner shutdown of Camel, as dependent bean's are not shutdown at this moment.
848     * The bean's will then be shutdown after camelContext.
849     */
850    public void setShutdownEager(String shutdownEager) {
851        this.shutdownEager = shutdownEager;
852    }
853
854    @Override
855    public String getUseMDCLogging() {
856        return useMDCLogging;
857    }
858
859    /**
860     * Set whether <a href="http://www.slf4j.org/api/org/slf4j/MDC.html">MDC</a> is enabled.
861     */
862    public void setUseMDCLogging(String useMDCLogging) {
863        this.useMDCLogging = useMDCLogging;
864    }
865
866    public String getMDCLoggingKeysPattern() {
867        return mdcLoggingKeysPattern;
868    }
869
870    /**
871     * Sets the pattern used for determine which custom MDC keys to propagate during message routing when
872     * the routing engine continues routing asynchronously for the given message. Setting this pattern to * will
873     * propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with
874     * either foo or bar.
875     * Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name.
876     *
877     * The match rules are applied in this order (case insensitive):
878     *
879     * 1. exact match, returns true
880     * 2. wildcard match (pattern ends with a * and the name starts with the pattern), returns true
881     * 3. regular expression match, returns true
882     * 4. otherwise returns false
883     */
884    public void setMDCLoggingKeysPattern(String mdcLoggingKeysPattern) {
885        this.mdcLoggingKeysPattern = mdcLoggingKeysPattern;
886    }
887
888    @Override
889    public String getUseDataType() {
890        return useDataType;
891    }
892
893    /**
894     * Whether to enable using data type on Camel messages.
895     * <p/>
896     * Data type are automatic turned on if:
897     * <ul>
898     *   <li>one ore more routes has been explicit configured with input and output types</li>
899     *   <li>when using rest-dsl with binding turned on</li>
900     * </ul>
901     * Otherwise data type is default off.
902     */
903    public void setUseDataType(String useDataType) {
904        this.useDataType = useDataType;
905    }
906
907    @Override
908    public String getUseBreadcrumb() {
909        return useBreadcrumb;
910    }
911
912    /**
913     * Set whether breadcrumb is enabled.
914     */
915    public void setUseBreadcrumb(String useBreadcrumb) {
916        this.useBreadcrumb = useBreadcrumb;
917    }
918
919    @Override
920    public String getAllowUseOriginalMessage() {
921        return allowUseOriginalMessage;
922    }
923
924    /**
925     * Sets whether to allow access to the original message from Camel's error handler,
926     * or from {@link org.apache.camel.spi.UnitOfWork#getOriginalInMessage()}.
927     * <p/>
928     * Turning this off can optimize performance, as defensive copy of the original message is not needed.
929     */
930    public void setAllowUseOriginalMessage(String allowUseOriginalMessage) {
931        this.allowUseOriginalMessage = allowUseOriginalMessage;
932    }
933
934    @Override
935    public String getCaseInsensitiveHeaders() {
936        return caseInsensitiveHeaders;
937    }
938
939    /**
940     * Whether to use case sensitive or insensitive headers.
941     *
942     * Important: When using case sensitive (this is set to false).
943     * Then the map is case sensitive which means headers such as content-type and Content-Type are
944     * two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers.
945     * However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care.
946     *
947     * Default is true.
948     */
949    public void setCaseInsensitiveHeaders(String caseInsensitiveHeaders) {
950        this.caseInsensitiveHeaders = caseInsensitiveHeaders;
951    }
952
953    @Override
954    public String getRuntimeEndpointRegistryEnabled() {
955        return runtimeEndpointRegistryEnabled;
956    }
957
958    /**
959     * Sets whether {@link org.apache.camel.spi.RuntimeEndpointRegistry} is enabled.
960     */
961    public void setRuntimeEndpointRegistryEnabled(String runtimeEndpointRegistryEnabled) {
962        this.runtimeEndpointRegistryEnabled = runtimeEndpointRegistryEnabled;
963    }
964
965    @Override
966    public String getInflightRepositoryBrowseEnabled() {
967        return inflightRepositoryBrowseEnabled;
968    }
969
970    /**
971     * Sets whether the inflight repository should allow browsing each inflight exchange.
972     *
973     * This is by default disabled as there is a very slight performance overhead when enabled.
974     */
975    public void setInflightRepositoryBrowseEnabled(String inflightRepositoryBrowseEnabled) {
976        this.inflightRepositoryBrowseEnabled = inflightRepositoryBrowseEnabled;
977    }
978
979    @Override
980    public String getManagementNamePattern() {
981        return managementNamePattern;
982    }
983
984    /**
985     * The naming pattern for creating the CamelContext management name.
986     */
987    public void setManagementNamePattern(String managementNamePattern) {
988        this.managementNamePattern = managementNamePattern;
989    }
990
991    @Override
992    public String getThreadNamePattern() {
993        return threadNamePattern;
994    }
995
996    /**
997     * Sets the thread name pattern used for creating the full thread name.
998     * <p/>
999     * The default pattern is: <tt>Camel (#camelId#) thread ##counter# - #name#</tt>
1000     * <p/>
1001     * Where <tt>#camelId#</tt> is the name of the {@link org.apache.camel.CamelContext}
1002     * <br/>and <tt>#counter#</tt> is a unique incrementing counter.
1003     * <br/>and <tt>#name#</tt> is the regular thread name.
1004     * <br/>You can also use <tt>#longName#</tt> is the long thread name which can includes endpoint parameters etc.
1005     */
1006    public void setThreadNamePattern(String threadNamePattern) {
1007        this.threadNamePattern = threadNamePattern;
1008    }
1009
1010    @Override
1011    public String getLoadTypeConverters() {
1012        return loadTypeConverters;
1013    }
1014
1015    /**
1016     * Sets whether to load custom type converters by scanning classpath.
1017     * This can be turned off if you are only using Camel components
1018     * that does not provide type converters which is needed at runtime.
1019     * In such situations setting this option to false, can speedup starting
1020     * Camel.
1021     *
1022     * @param loadTypeConverters whether to load custom type converters.
1023     */
1024    public void setLoadTypeConverters(String loadTypeConverters) {
1025        this.loadTypeConverters = loadTypeConverters;
1026    }
1027
1028    @Override
1029    public String getTypeConverterStatisticsEnabled() {
1030        return typeConverterStatisticsEnabled;
1031    }
1032
1033    /**
1034     * Sets whether or not type converter statistics is enabled.
1035     * <p/>
1036     * By default the type converter utilization statistics is disabled.
1037     * <b>Notice:</b> If enabled then there is a slight performance impact under very heavy load.
1038     * <p/>
1039     * You can enable/disable the statistics at runtime using the
1040     * {@link org.apache.camel.spi.TypeConverterRegistry#getStatistics()#setTypeConverterStatisticsEnabled(Boolean)} method,
1041     * or from JMX on the {@link org.apache.camel.api.management.mbean.ManagedTypeConverterRegistryMBean} mbean.
1042     */
1043    public void setTypeConverterStatisticsEnabled(String typeConverterStatisticsEnabled) {
1044        this.typeConverterStatisticsEnabled = typeConverterStatisticsEnabled;
1045    }
1046
1047    @Override
1048    public TypeConverterExists getTypeConverterExists() {
1049        return typeConverterExists;
1050    }
1051
1052    /**
1053     * What should happen when attempting to add a duplicate type converter.
1054     * <p/>
1055     * The default behavior is to override the existing.
1056     */
1057    public void setTypeConverterExists(TypeConverterExists typeConverterExists) {
1058        this.typeConverterExists = typeConverterExists;
1059    }
1060
1061    @Override
1062    public LoggingLevel getTypeConverterExistsLoggingLevel() {
1063        return typeConverterExistsLoggingLevel;
1064    }
1065
1066    /**
1067     * The logging level to use when logging that a type converter already exists when attempting to add a duplicate type converter.
1068     * <p/>
1069     * The default logging level is <tt>WARN</tt>
1070     */
1071    public void setTypeConverterExistsLoggingLevel(LoggingLevel typeConverterExistsLoggingLevel) {
1072        this.typeConverterExistsLoggingLevel = typeConverterExistsLoggingLevel;
1073    }
1074
1075    @Override
1076    public CamelJMXAgentDefinition getCamelJMXAgent() {
1077        return camelJMXAgent;
1078    }
1079
1080    @Override
1081    public List<RouteBuilderDefinition> getBuilderRefs() {
1082        return builderRefs;
1083    }
1084
1085    /**
1086     * Refers to Java {@link RouteBuilder} instances to include as routes in this CamelContext.
1087     */
1088    public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
1089        this.builderRefs = builderRefs;
1090    }
1091
1092    @Override
1093    public List<RouteContextRefDefinition> getRouteRefs() {
1094        return routeRefs;
1095    }
1096
1097    /**
1098     * Refers to XML routes to include as routes in this CamelContext.
1099     */
1100    public void setRouteRefs(List<RouteContextRefDefinition> routeRefs) {
1101        this.routeRefs = routeRefs;
1102    }
1103
1104    @Override
1105    public List<RestContextRefDefinition> getRestRefs() {
1106        return restRefs;
1107    }
1108
1109    /**
1110     * Refers to XML rest-dsl to include as REST services in this CamelContext.
1111     */
1112    public void setRestRefs(List<RestContextRefDefinition> restRefs) {
1113        this.restRefs = restRefs;
1114    }
1115
1116    @Override
1117    public String getErrorHandlerRef() {
1118        return errorHandlerRef;
1119    }
1120
1121    /**
1122     * Sets the name of the error handler object used to default the error handling strategy
1123     */
1124    public void setErrorHandlerRef(String errorHandlerRef) {
1125        this.errorHandlerRef = errorHandlerRef;
1126    }
1127
1128    /**
1129     * Configuration of data formats.
1130     */
1131    public void setDataFormats(DataFormatsDefinition dataFormats) {
1132        this.dataFormats = dataFormats;
1133    }
1134
1135    @Override
1136    public DataFormatsDefinition getDataFormats() {
1137        return dataFormats;
1138    }
1139
1140    /**
1141     * Configuration of transformers.
1142     */
1143    public void setTransformers(TransformersDefinition transformers) {
1144        this.transformers = transformers;
1145    }
1146
1147    @Override
1148    public TransformersDefinition getTransformers() {
1149        return transformers;
1150    }
1151
1152    /**
1153     * Configuration of validators.
1154     */
1155    public void setValidators(ValidatorsDefinition validators) {
1156        this.validators = validators;
1157    }
1158
1159    @Override
1160    public ValidatorsDefinition getValidators() {
1161        return validators;
1162    }
1163
1164    /**
1165     * Configuration of redelivery settings.
1166     */
1167    public void setRedeliveryPolicies(List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies) {
1168        this.redeliveryPolicies = redeliveryPolicies;
1169    }
1170
1171    @Override
1172    public List<AbstractCamelFactoryBean<?>> getBeansFactory() {
1173        return beansFactory;
1174    }
1175
1176    /**
1177     * Miscellaneous configurations
1178     */
1179    public void setBeansFactory(List<AbstractCamelFactoryBean<?>> beansFactory) {
1180        this.beansFactory = beansFactory;
1181    }
1182
1183    @Override
1184    public List<?> getBeans() {
1185        return beans;
1186    }
1187
1188    /**
1189     * Miscellaneous configurations
1190     */
1191    public void setBeans(List<?> beans) {
1192        this.beans = beans;
1193    }
1194
1195    @Override
1196    public ServiceCallConfigurationDefinition getDefaultServiceCallConfiguration() {
1197        return defaultServiceCallConfiguration;
1198    }
1199
1200    /**
1201     * ServiceCall EIP default configuration
1202     */
1203    public void setDefaultServiceCallConfiguration(ServiceCallConfigurationDefinition defaultServiceCallConfiguration) {
1204        this.defaultServiceCallConfiguration = defaultServiceCallConfiguration;
1205    }
1206
1207    @Override
1208    public List<ServiceCallConfigurationDefinition> getServiceCallConfigurations() {
1209        return serviceCallConfigurations;
1210    }
1211
1212    /**
1213     * ServiceCall EIP configurations
1214     */
1215    public void setServiceCallConfigurations(List<ServiceCallConfigurationDefinition> serviceCallConfigurations) {
1216        this.serviceCallConfigurations = serviceCallConfigurations;
1217    }
1218
1219    @Override
1220    public List<HystrixConfigurationDefinition> getHystrixConfigurations() {
1221        return hystrixConfigurations;
1222    }
1223
1224    @Override
1225    public HystrixConfigurationDefinition getDefaultHystrixConfiguration() {
1226        return defaultHystrixConfiguration;
1227    }
1228
1229    /**
1230     * Hystrix EIP default configuration
1231     */
1232    public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) {
1233        this.defaultHystrixConfiguration = defaultHystrixConfiguration;
1234    }
1235
1236    /**
1237     * Hystrix Circuit Breaker EIP configurations
1238     */
1239    public void setHystrixConfigurations(List<HystrixConfigurationDefinition> hystrixConfigurations) {
1240        this.hystrixConfigurations = hystrixConfigurations;
1241    }
1242
1243    @Override
1244    public Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration() {
1245        return defaultResilience4jConfiguration;
1246    }
1247
1248    /**
1249     * Resilience4j EIP default configuration
1250     */
1251    public void setDefaultResilience4jConfiguration(Resilience4jConfigurationDefinition defaultResilience4jConfiguration) {
1252        this.defaultResilience4jConfiguration = defaultResilience4jConfiguration;
1253    }
1254
1255    @Override
1256    public List<Resilience4jConfigurationDefinition> getResilience4jConfigurations() {
1257        return resilience4jConfigurations;
1258    }
1259
1260    /**
1261     * Resilience4j Circuit Breaker EIP configurations
1262     */
1263    public void setResilience4jConfigurations(List<Resilience4jConfigurationDefinition> resilience4jConfigurations) {
1264        this.resilience4jConfigurations = resilience4jConfigurations;
1265    }
1266
1267    @Override
1268    public FaultToleranceConfigurationDefinition getDefaultFaultToleranceConfiguration() {
1269        return defaultFaultToleranceConfiguration;
1270    }
1271
1272    /**
1273     * MicroProfile Fault Tolerance EIP default configuration
1274     */
1275    public void setDefaultFaultToleranceConfiguration(FaultToleranceConfigurationDefinition defaultFaultToleranceConfiguration) {
1276        this.defaultFaultToleranceConfiguration = defaultFaultToleranceConfiguration;
1277    }
1278
1279    @Override
1280    public List<FaultToleranceConfigurationDefinition> getFaultToleranceConfigurations() {
1281        return faultToleranceConfigurations;
1282    }
1283
1284    /**
1285     * MicroProfile Circuit Breaker EIP configurations
1286     */
1287    public void setFaultToleranceConfigurations(List<FaultToleranceConfigurationDefinition> faultToleranceConfigurations) {
1288        this.faultToleranceConfigurations = faultToleranceConfigurations;
1289    }
1290
1291    /**
1292     * Configuration of error handlers that triggers on exceptions thrown.
1293     */
1294    public void setOnExceptions(List<OnExceptionDefinition> onExceptions) {
1295        this.onExceptions = onExceptions;
1296    }
1297
1298    @Override
1299    public List<OnExceptionDefinition> getOnExceptions() {
1300        return onExceptions;
1301    }
1302
1303    @Override
1304    public List<OnCompletionDefinition> getOnCompletions() {
1305        return onCompletions;
1306    }
1307
1308    /**
1309     * Configuration of sub routes to run at the completion of routing.
1310     */
1311    public void setOnCompletions(List<OnCompletionDefinition> onCompletions) {
1312        this.onCompletions = onCompletions;
1313    }
1314
1315    @Override
1316    public ShutdownRoute getShutdownRoute() {
1317        return shutdownRoute;
1318    }
1319
1320    /**
1321     * Sets the ShutdownRoute option for routes.
1322     */
1323    public void setShutdownRoute(ShutdownRoute shutdownRoute) {
1324        this.shutdownRoute = shutdownRoute;
1325    }
1326
1327    @Override
1328    public ShutdownRunningTask getShutdownRunningTask() {
1329        return shutdownRunningTask;
1330    }
1331
1332    /**
1333     * Sets the ShutdownRunningTask option to use when shutting down a route.
1334     */
1335    public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask) {
1336        this.shutdownRunningTask = shutdownRunningTask;
1337    }
1338
1339    @Override
1340    public List<ThreadPoolProfileDefinition> getThreadPoolProfiles() {
1341        return threadPoolProfiles;
1342    }
1343
1344    /**
1345     * Configuration of thread pool profiles.
1346     */
1347    public void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles) {
1348        this.threadPoolProfiles = threadPoolProfiles;
1349    }
1350
1351    public List<CamelThreadPoolFactoryBean> getThreadPools() {
1352        return threadPools;
1353    }
1354
1355    /**
1356     * Configuration of thread pool
1357     */
1358    public void setThreadPools(List<CamelThreadPoolFactoryBean> threadPools) {
1359        this.threadPools = threadPools;
1360    }
1361
1362    @Override
1363    public String getDependsOn() {
1364        return dependsOn;
1365    }
1366
1367    /**
1368     * List of other bean id's this CamelContext depends up. Multiple bean id's can be separated by comma.
1369     */
1370    public void setDependsOn(String dependsOn) {
1371        this.dependsOn = dependsOn;
1372    }
1373    
1374    public boolean isImplicitId() {
1375        return implicitId;
1376    }
1377    
1378    public void setImplicitId(boolean flag) {
1379        implicitId = flag;
1380    }
1381}