Examples of RuleContentText


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

public class SpringContextContentHandler extends PlainTextContentHandler implements IHasCustomValidator {

    public void retrieveAssetContent(Asset asset, ModuleItem pkg, AssetItem item)
            throws SerializationException {
        if (item.getContent() != null) {
            RuleContentText text = new RuleContentText();
            text.content = item.getContent();
            asset.setContent(text);
        }
    }
View Full Code Here

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

    }

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

        RuleContentText text = (RuleContentText) asset.getContent();

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

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

public abstract class PlainTextContentHandler extends ContentHandler {

    public void retrieveAssetContent(Asset asset,
                                     AssetItem item) throws SerializationException {
        //default to text, goode olde texte, just like mum used to make.
        RuleContentText text = new RuleContentText();
        text.content = item.getContent();
        asset.setContent( text );

    }
View Full Code Here

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

public class SpringContextContentHandler extends PlainTextContentHandler implements IHasCustomValidator {

    public void retrieveAssetContent(Asset asset, ModuleItem pkg, AssetItem item)
            throws SerializationException {
        if (item.getContent() != null) {
            RuleContentText text = new RuleContentText();
            text.content = item.getContent();
            asset.setContent(text);
        }
    }
View Full Code Here

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

    }

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

        RuleContentText text = (RuleContentText) asset.getContent();

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

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

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

                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.getLastModified() );
        asset.getMetaData().setCoverage( "boo" );
        asset.setContent( new RuleContentText() );
        ((RuleContentText) asset.getContent()).content = "yeah !";
        Thread.sleep( 100 );

        // Mock up SEAM contexts
        Map<String, Object> application = new HashMap<String, Object>();
View Full Code Here

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

                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.getLastModified() );
        asset.getMetaData().setCoverage( "boo" );
        asset.setContent( new RuleContentText() );
        ((RuleContentText) asset.getContent()).content = "yeah !";
        Thread.sleep( 100 );

        // Mock up SEAM contexts
        Map<String, Object> application = new HashMap<String, Object>();
View Full Code Here

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

            RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );

            assertNotNull( asset.lastModified );

            asset.metaData.coverage = "boo";
            asset.content = new RuleContentText();
            ((RuleContentText) asset.content).content = "yeah !";
            asset.description = "Description 1";

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

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

        assertNull( result );

        RuleBaseCache.getInstance().clearCache();

        // try it with a bad rule
        RuleContentText text = new RuleContentText();
        text.content = "rule 'MyBadRule' \n when Personx() then System.err.println(42); \n end";
        rule.content = text;

        result = repositoryAssetService.buildAsset( rule );
        assertNotNull( result );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.