Package com.consol.citrus.model.config.core

Examples of com.consol.citrus.model.config.core.FunctionLibrary


    /**
     * Gets the default function library from Citrus Spring bean configuration.
     * @return
     */
    public FunctionLibrary getDefaultFunctionLibrary() {
        FunctionLibrary library = new ObjectFactory().createFunctionLibrary();

        FunctionConfig config = new FunctionConfig();
        com.consol.citrus.functions.FunctionLibrary defaultFunctionLibrary = config.getFunctionaLibrary();
        library.setId(defaultFunctionLibrary.getName());
        library.setPrefix(defaultFunctionLibrary.getPrefix());

        for (Map.Entry<String, Function> functionEntry : defaultFunctionLibrary.getMembers().entrySet()) {
            FunctionLibrary.Function function = new FunctionLibrary.Function();
            function.setName(functionEntry.getKey());
            function.setClazz(functionEntry.getValue().getClass().getName());
            library.getFunctions().add(function);
        }

        return library;
    }
View Full Code Here


     * Gets the function library object from bean in application context. Bean is identified by its id.
     * @param id
     * @return
     */
    public FunctionLibrary getFunctionLibrary(String id) {
        FunctionLibrary library = springBeanService.getBeanDefinition(projectService.getProjectContextConfigFile(), id, FunctionLibrary.class);

        if (library == null) {
            SpringBean springBean = springBeanService.getBeanDefinition(projectService.getProjectContextConfigFile(), id, SpringBean.class);
            if (springBean != null) {
                library = functionLibrarySpringBeanConverter.convert(springBean);
View Full Code Here

TOP

Related Classes of com.consol.citrus.model.config.core.FunctionLibrary

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.