Package org.drools.guvnor.server.builder

Examples of org.drools.guvnor.server.builder.ClassLoaderBuilder


    protected SuggestionCompletionEngine loadFor(final ModuleItem packageItem) {
        SuggestionCompletionEngine result = null;
        ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
        try {
            BRMSSuggestionCompletionLoader loader = null;
            ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
            if (classLoaderBuilder.hasJars()) {
                ClassLoader classLoader = classLoaderBuilder.buildClassLoader();

                Thread.currentThread().setContextClassLoader(classLoader);

                loader = new BRMSSuggestionCompletionLoader(classLoader);
            } else {
View Full Code Here


        }
    }

    private ClassLoaderBuilder createClassLoaderBuilder(ModuleItem packageItem) {
        return new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
    }
View Full Code Here

            buf.append(as.getContent());
            buf.append('\n');
        }


        ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));

//        String packageName = packageItem.getName();
//        return super.getSuggestionEngine("package " + packageName + "\n\n" + droolsHeader + "\n" + buf.toString(),
        return super.getSuggestionEngine(droolsHeader + "\n" + buf.toString(),
                classLoaderBuilder.getJarInputStreams(),
                getDSLMappingFiles(packageItem),
                getDataEnums(packageItem));
    }
View Full Code Here

        //Setup class-loader to check for class visibility
        JarInputStream cljis = new JarInputStream( assetItem.getBinaryContentAttachment() );
        List<JarInputStream> jarInputStreams = new ArrayList<JarInputStream>();
        jarInputStreams.add( cljis );
        ClassLoaderBuilder clb = new ClassLoaderBuilder( jarInputStreams );
        ClassLoader cl = clb.buildClassLoader();

        //Reset stream to read classes
        JarInputStream jis = new JarInputStream( assetItem.getBinaryContentAttachment() );
        JarEntry entry = null;
View Full Code Here

            repositoryModuleOperations.buildModuleWithoutErrors( moduleItem, false );
        }
    }

    private ClassLoaderBuilder createClassLoaderBuilder(ModuleItem packageItem) {
        return new ClassLoaderBuilder( packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat( AssetFormats.MODEL ) );
    }
View Full Code Here

        }
    }

    private ClassLoaderBuilder createClassLoaderBuilder(ModuleItem packageItem) {
        return new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
    }
View Full Code Here

            buf.append(as.getContent());
            buf.append('\n');
        }


        ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));

//        String packageName = packageItem.getName();
//        return super.getSuggestionEngine("package " + packageName + "\n\n" + droolsHeader + "\n" + buf.toString(),
        return super.getSuggestionEngine(droolsHeader + "\n" + buf.toString(),
                classLoaderBuilder.getJarInputStreams(),
                getDSLMappingFiles(packageItem),
                getDataEnums(packageItem));
    }
View Full Code Here

            buf.append(as.getContent());
            buf.append('\n');
        }


        ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));

//        String packageName = packageItem.getName();
//        return super.getSuggestionEngine("package " + packageName + "\n\n" + droolsHeader + "\n" + buf.toString(),
        return super.getSuggestionEngine(droolsHeader + "\n" + buf.toString(),
                classLoaderBuilder.getJarInputStreams(),
                getDSLMappingFiles(packageItem),
                getDataEnums(packageItem));
    }
View Full Code Here

        }
    }

    private ClassLoaderBuilder createClassLoaderBuilder(ModuleItem packageItem) {
        return new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
    }
View Full Code Here

    protected SuggestionCompletionEngine loadFor(final ModuleItem packageItem) {
        SuggestionCompletionEngine result = null;
        ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
        try {
            BRMSSuggestionCompletionLoader loader = null;
            ClassLoaderBuilder classLoaderBuilder = new ClassLoaderBuilder(packageItem.listAssetsWithVersionsSpecifiedByDependenciesByFormat(AssetFormats.MODEL));
            if (classLoaderBuilder.hasJars()) {
                ClassLoader classLoader = classLoaderBuilder.buildClassLoader();

                Thread.currentThread().setContextClassLoader(classLoader);

                loader = new BRMSSuggestionCompletionLoader(classLoader);
            } else {
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.builder.ClassLoaderBuilder

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.