Package org.drools.guvnor.server.builder

Examples of org.drools.guvnor.server.builder.ContentPackageAssembler$ErrorLogger


            if ( handler instanceof IValidating ) {
                return ((IValidating) handler).validateAsset( item );
            } else {

                ContentPackageAssembler asm = new ContentPackageAssembler( item );
                if ( !asm.hasErrors() ) {
                    return null;
                } else {
                    return generateBuilderResults( asm );
                }
            }
View Full Code Here


        }

        // load package
        PackageItem item = repository.loadPackage( packageName );

        ContentPackageAssembler asm = new ContentPackageAssembler( item,
                                                                   false );
        List<String> result = new ArrayList<String>();
        DrlParser p = new DrlParser();
        try {
            PackageDescr pkg = p.parse( asm.getDRL() );
            int count = 0;
            if ( pkg != null ) {
                for ( Iterator iterator = pkg.getRules().iterator(); iterator.hasNext(); ) {
                    RuleDescr r = (RuleDescr) iterator.next();
                    result.add( r.getName() );
View Full Code Here

                                    boolean isLatest,
                                    OutputStream out) throws IOException {
        PackageItem item = null;
        if ( isLatest ) {
            item = repository.loadPackage( packageName );
            ContentPackageAssembler asm = new ContentPackageAssembler( item,
                                                                       false );
            String drl = asm.getDRL();
            out.write( drl.getBytes() );
            out.flush();
            return packageName + ".drl";
        } else {
            item = repository.loadPackageSnapshot( packageName,
                                                   packageVersion );
            ContentPackageAssembler asm = new ContentPackageAssembler( item,
                                                                       false );
            String drl = asm.getDRL();
            out.write( drl.getBytes() );
            out.flush();
            return packageName + "_" + URLEncoder.encode( packageVersion,
                                                          "UTF-8" ) + ".drl";
        }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.builder.ContentPackageAssembler$ErrorLogger

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.