Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.RuleContentText


            RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );

            assertNotNull( asset.getLastModified() );

            asset.getMetaData().setCoverage( "boo" );
            asset.setContent( new RuleContentText() );
            ((RuleContentText) asset.getContent()).content = "yeah !";
            asset.setDescription( "Description 1" );

            Date start = new Date();
            Thread.sleep( 100 );
View Full Code Here


            RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );

            assertNotNull( asset.getLastModified() );

            asset.getMetaData().setCoverage( "boo" );
            asset.setContent( new RuleContentText() );
            ((RuleContentText) asset.getContent()).content = "yeah !";
            asset.setDescription( "Description 1" );

            Date start = new Date();
            Thread.sleep( 100 );
View Full Code Here

        implements
        IRuleAsset {

    public void retrieveAssetContent(RuleAsset asset,
                                     AssetItem item) throws SerializationException {
        RuleContentText text = new RuleContentText();
        text.content = item.getContent();

        asset.content = text;

    }
View Full Code Here

    }

    public void storeAssetContent(RuleAsset asset,
                                  AssetItem repoAsset) throws SerializationException {

        RuleContentText text = (RuleContentText) asset.content;
        repoAsset.updateContent( text.content );

    }
View Full Code Here

    }

    public void assembleDRL(BRMSPackageBuilder builder,
                            RuleAsset asset,
                            StringBuilder stringBuilder) {
        RuleContentText text = (RuleContentText) asset.content;
        String source = text.content;

        source = getDRL( source,
                         asset.name,
                         null );
View Full Code Here

public class XmlFileHandler extends PlainTextContentHandler {
    public void retrieveAssetContent(RuleAsset asset, PackageItem pkg, AssetItem item)
            throws SerializationException {
        if (item.getContent() != null) {
            RuleContentText text = new RuleContentText();
            text.content = item.getContent();
            asset.content = text;
        }
    }
View Full Code Here

        }
    }

    public void storeAssetContent(RuleAsset asset, AssetItem repoAsset) throws SerializationException {

        RuleContentText text = (RuleContentText) asset.content;

        try {
            InputStream input = new ByteArrayInputStream(text.content.getBytes("UTF-8"));
            repoAsset.updateBinaryContentAttachment(input);
        } catch (UnsupportedEncodingException e) {
View Full Code Here

            FactModels ms = new FactModels();
            ms.models = models;
            asset.content = ms;
        } catch ( DroolsParserException e ) {
            log.error( "Unable to parse the DRL for the model - falling back to text (" + e.getMessage() + ")" );
            RuleContentText text = new RuleContentText();
            text.content = item.getContent();
            asset.content = text;
        }

    }
View Full Code Here

                                                      throws SerializationException {
        if ( asset.content instanceof FactModels ) {
            FactModels fm = (FactModels) asset.content;
            repoAsset.updateContent( toDRL( fm.models ) );
        } else {
            RuleContentText text = (RuleContentText) asset.content;
            repoAsset.updateContent( text.content );
        }

    }
View Full Code Here

                                     AssetItem assetItem) throws SerializationException {

        InputStream inputStream = assetItem.getBinaryContentAttachment();

        if (inputStream != null) {
            RuleContentText text = new RuleContentText();
            text.content = ruleAsset.name;
            ruleAsset.content = text;
        }

    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.RuleContentText

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.