Package com.alphacsp.common.io

Examples of com.alphacsp.common.io.DefaultResource


        ClassLoader classLoader = ClassUtils.getDefaultClassLoader();

        XmlEnvironmentTemplateReader environmentTemplateReader = new XmlEnvironmentTemplateReader();
        environmentTemplateReader.setClassLoader(classLoader);
        environmentTemplateReader.setXmlFile(new DefaultResource(environmentTemplateFileLocation));
        EnvironmentTemplate environmentTemplate = environmentTemplateReader.readObject();

        PropertiesFileEnvironmentFactoryBean environmentFactory = new PropertiesFileEnvironmentFactoryBean(environmentTemplate);
        environmentFactory.setEnvironmentFile(new DefaultResource(environmentFileLocation));
        Environment environment = environmentFactory.createEnvironment();
        interperter.setEnvironment(environment);

        XmlCommandsReader commandsReader = new XmlCommandsReader();
        commandsReader.setClassLoader(classLoader);
        commandsReader.setXmlFile(new DefaultResource(commandsFileLocation));
        CommandsTemplate groups = commandsReader.readObject();
        interperter.setCommandsTemplate(groups);

        return interperter;
    }
View Full Code Here

TOP

Related Classes of com.alphacsp.common.io.DefaultResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.