Package org.drools.guvnor.client.rpc

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


public class SpringContextContentHandler extends PlainTextContentHandler implements IHasCustomValidator {
    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


    public void retrieveAssetContent(RuleAsset 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.content = text;

    }
View Full Code Here

        this( asset );
    }

    public DSLRuleEditor(RuleAsset asset) {

        RuleContentText cont = (RuleContentText) asset.content;

        this.data = cont;
        text = new TextArea();
        text.setWidth( "100%" );
        text.setVisibleLines( 16 );
View Full Code Here

      FactModels ms = new FactModels();
      ms.models = models;
      asset.content = ms;
    } catch (DroolsParserException e) {
      System.err.println("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

    // Get the name

    InputStream in = item.getBinaryContentAttachment();

    if (in != null) {
      RuleContentText text = new RuleContentText();
      text.content = asset.metaData.name;
      asset.content = text;
    }

  }
View Full Code Here

    public void retrieveAssetContent(RuleAsset asset,
                                     PackageItem pkg,
                                     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.content = text;

    }
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

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.