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

org.mule.modules.ftpclient.generated.config.FtpClientNamespaceHandler Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version

package org.mule.modules.ftpclient.generated.config;

import javax.annotation.Generated;
import org.mule.config.MuleManifest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.FatalBeanException;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;


/**
 * Registers bean definitions parsers for handling elements in http://www.mulesoft.org/schema/mule/ftp-client.
 * 
 */
@SuppressWarnings("all")
@Generated(value = "Mule DevKit Version 3.9.0", date = "2018-04-30T04:51:01+02:00", comments = "Build UNNAMED.2793.f49b6c7")
public class FtpClientNamespaceHandler
    extends NamespaceHandlerSupport
{

    private static Logger logger = LoggerFactory.getLogger(FtpClientNamespaceHandler.class);

    private void handleException(String beanName, String beanScope, NoClassDefFoundError noClassDefFoundError) {
        String muleVersion = "";
        try {
            muleVersion = MuleManifest.getProductVersion();
        } catch (Exception _x) {
            logger.error("Problem while reading mule version");
        }
        logger.error(((((("Cannot launch the mule app, the  "+ beanScope)+" [")+ beanName)+"] within the connector [ftp-client] is not supported in mule ")+ muleVersion));
        throw new FatalBeanException(((((("Cannot launch the mule app, the  "+ beanScope)+" [")+ beanName)+"] within the connector [ftp-client] is not supported in mule ")+ muleVersion), noClassDefFoundError);
    }

    /**
     * Invoked by the {@link DefaultBeanDefinitionDocumentReader} after construction but before any custom elements are parsed. 
     * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser)
     * 
     */
    public void init() {
        try {
            this.registerBeanDefinitionParser("ftp-config", new FtpClientConnectorFtpConfigConfigDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("ftp-config", "@Config", ex);
        }
        try {
            this.registerBeanDefinitionParser("sftp-config", new FtpClientConnectorSftpConfigConfigDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("sftp-config", "@Config", ex);
        }
        try {
            this.registerBeanDefinitionParser("put-file", new PutFileDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("put-file", "@Processor", ex);
        }
        try {
            this.registerBeanDefinitionParser("get-file", new GetFileDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("get-file", "@Processor", ex);
        }
        try {
            this.registerBeanDefinitionParser("delete", new DeleteDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("delete", "@Processor", ex);
        }
        try {
            this.registerBeanDefinitionParser("list", new ListDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("list", "@Processor", ex);
        }
        try {
            this.registerBeanDefinitionParser("rename", new RenameDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("rename", "@Processor", ex);
        }
        try {
            this.registerBeanDefinitionParser("poll", new PollDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("poll", "@Source", ex);
        }
        try {
            this.registerBeanDefinitionParser("poll-with-archiving-by-moving-to-directory", new PollWithArchivingByMovingToDirectoryDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("poll-with-archiving-by-moving-to-directory", "@Source", ex);
        }
        try {
            this.registerBeanDefinitionParser("poll-with-archiving-by-renaming", new PollWithArchivingByRenamingDefinitionParser());
        } catch (NoClassDefFoundError ex) {
            handleException("poll-with-archiving-by-renaming", "@Source", ex);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy