Package org.drools.guvnor.server.builder

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


    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


        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(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

    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

        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

        ContentHandler handler = ContentManager
                .getHandler( asset.metaData.format );

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

                handler.storeAssetContent(asset,
View Full Code Here

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

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            //now we load up the DSL files
            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

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

        StringBuilder stringBuilder = new StringBuilder();
        BRMSPackageBuilder builder = new BRMSPackageBuilder();
        // now we load up the DSL files
        builder.setDSLFiles(DSLLoader.loadDSLMappingFiles(item.getPackage()));
        ((IRuleAsset) handler).assembleDRL( builder,
                                            item,
                                            stringBuilder );

        return stringBuilder.toString();
View Full Code Here

        StringBuffer buf = new StringBuffer();
        if ( handler.isRuleAsset() ) {
            log.info("****** isRuleAsset!");

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            // now we load up the DSL files
            PackageItem packageItem = repository.loadPackage( asset.metaData.packageName );
            builder.setDSLFiles( BRMSPackageBuilder.getDSLMappingFiles( packageItem, new BRMSPackageBuilder.DSLErrorEvent() {
                public void recordError(AssetItem asset, String message) {
                    // ignore at this point...
                }
            } ) );

View Full Code Here

    private static String getDRL(AssetItem item) {
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuffer buf = new StringBuffer();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
            // now we load up the DSL files
            builder.setDSLFiles( BRMSPackageBuilder.getDSLMappingFiles( item.getPackage(),
                                                                        new BRMSPackageBuilder.DSLErrorEvent() {
                                                                            public void recordError(AssetItem asset,
                                                                                                    String message) {
                                                                                // ignore at this point...
                                                                            }
View Full Code Here

TOP

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

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.