Package org.drools.guvnor.server.builder

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


    protected String buildAssetSource(RuleAsset asset) throws SerializationException {
        ContentHandler handler = ContentManager.getHandler( asset.getMetaData().getFormat() );

        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {
            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            // now we load up the DSL files
            PackageItem packageItem = getRulesRepository().loadPackage( asset.getMetaData().getPackageName() );
            builder.setDSLFiles( DSLLoader.loadDSLMappingFiles( packageItem ) );
            if ( asset.getMetaData().isBinary() ) {
                AssetItem item = getRulesRepository().loadAssetByUUID(
                                                                       asset.getUuid() );

                handler.storeAssetContent( asset,
View Full Code Here


        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            builder.setDSLFiles( DSLLoader.loadDSLMappingFiles( item.getPackage() ) );
            ((IRuleAsset) handler).assembleDRL( builder,
                                                item,
                                                stringBuilder );
            out.write( stringBuilder.toString().getBytes() );
            return item.getName() + ".drl";
View Full Code Here

    protected String buildAssetSource(Asset asset) throws SerializationException {
        ContentHandler handler = ContentManager.getHandler(asset.getFormat());

        StringBuilder stringBuilder = new StringBuilder();
        if (handler.isRuleAsset()) {
            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            // now we load up the DSL files
            ModuleItem moduleItem = rulesRepository.loadModule(asset.getMetaData().getModuleName());
            builder.setDSLFiles(DSLLoader.loadDSLMappingFiles(moduleItem));
            if (asset.getMetaData().isBinary()) {
                AssetItem item = rulesRepository.loadAssetByUUID(
                        asset.getUuid());

                handler.storeAssetContent(asset,
View Full Code Here

        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            builder.setDSLFiles( DSLLoader.loadDSLMappingFiles( item.getModule() ) );
            ((IRuleAsset) handler).assembleDRL( builder,
                                                item,
                                                stringBuilder );
            out.write( stringBuilder.toString().getBytes() );
            return item.getName() + ".drl";
View Full Code Here

            if(previousVersionPath != null && !previousVersionPath.equals(path)) {
                ioService.move(Paths.convert( previousVersionPath ), nioPath, StandardCopyOption.REPLACE_EXISTING);
            }

            StringBuilder sb = new StringBuilder();
            BRMSPackageBuilder builder = new BRMSPackageBuilder( rulesRepository.loadModuleByUUID( jcrModule.getUuid() ) );
            BRLContentHandler handler = new BRLContentHandler();

            handler.assembleDRL( builder,
                                 jcrAssetItem,
                                 sb );
View Full Code Here

        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            builder.setDSLFiles( DSLLoader.loadDSLMappingFiles( item.getModule() ) );
            ((IRuleAsset) handler).assembleDRL( builder,
                                                item,
                                                stringBuilder );
            out.write( stringBuilder.toString().getBytes() );
            return item.getName() + ".drl";
View Full Code Here

    protected String buildAssetSource(RuleAsset asset) throws SerializationException {
        ContentHandler handler = ContentManager.getHandler(asset.getFormat());

        StringBuilder stringBuilder = new StringBuilder();
        if (handler.isRuleAsset()) {
            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            // now we load up the DSL files
            PackageItem packageItem = getRulesRepository().loadPackage(asset.getMetaData().getPackageName());
            builder.setDSLFiles(DSLLoader.loadDSLMappingFiles(packageItem));
            if (asset.getMetaData().isBinary()) {
                AssetItem item = getRulesRepository().loadAssetByUUID(
                        asset.getUuid());

                handler.storeAssetContent(asset,
View Full Code Here

            if(previousVersionPath != null && !previousVersionPath.equals(path)) {
                ioService.move(Paths.convert( previousVersionPath ), nioPath, StandardCopyOption.REPLACE_EXISTING);
            }

            StringBuilder sb = new StringBuilder();
            BRMSPackageBuilder builder = new BRMSPackageBuilder( rulesRepository.loadModuleByUUID( jcrModule.getUuid() ) );
            BRLContentHandler handler = new BRLContentHandler();

            handler.assembleDRL( builder,
                                 jcrAsset,
                                 sb );
View Full Code Here

        if (!handler.isRuleAsset()) {
            return null;
        }

        StringBuilder stringBuilder = new StringBuilder();
        BRMSPackageBuilder builder = new BRMSPackageBuilder();
        builder.setDSLFiles(DSLLoader.loadDSLMappingFiles(item.getModule()));
        ((IRuleAsset) handler).assembleDRL(builder,
                item,
                stringBuilder);

        return stringBuilder.toString();
View Full Code Here

        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            builder.setDSLFiles( DSLLoader.loadDSLMappingFiles( item.getModule() ) );
            ((IRuleAsset) handler).assembleDRL( builder,
                                                item,
                                                stringBuilder );
            out.write( stringBuilder.toString().getBytes() );
            return item.getName() + ".drl";
View Full Code Here

TOP

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

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.