Guvnor web application Drools 6.0.0-SNAPSHOT

org.drools.guvnor.server.contenthandler.drools
Class DRLFileContentHandler

java.lang.Object
  extended by org.drools.guvnor.server.contenthandler.ContentHandler
      extended by org.drools.guvnor.server.contenthandler.PlainTextContentHandler
          extended by org.drools.guvnor.server.contenthandler.drools.DRLFileContentHandler
All Implemented Interfaces:
ICompilable, IRuleAsset

public class DRLFileContentHandler
extends PlainTextContentHandler
implements IRuleAsset


Constructor Summary
DRLFileContentHandler()
           
 
Method Summary
 void assembleDRL(BRMSPackageBuilder builder, AssetItem asset, StringBuilder stringBuilder)
           
 void assembleDRL(BRMSPackageBuilder builder, Asset asset, StringBuilder stringBuilder)
           
 void compile(BRMSPackageBuilder builder, AssetItem asset, AssemblyErrorLogger logger)
           
 String getRawDRL(AssetItem asset)
           
static boolean isStandAloneRule(String content)
          This will try and sniff ouf if its a stand alone rule which will use the asset name as the rule name, or if it should be treated as a package (in the latter case, the content is passed as it to the compiler).
 
Methods inherited from class org.drools.guvnor.server.contenthandler.PlainTextContentHandler
retrieveAssetContent, storeAssetContent, validate, validateAsset
 
Methods inherited from class org.drools.guvnor.server.contenthandler.ContentHandler
isRuleAsset, parentNameFromCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DRLFileContentHandler

public DRLFileContentHandler()
Method Detail

compile

public void compile(BRMSPackageBuilder builder,
                    AssetItem asset,
                    AssemblyErrorLogger logger)
             throws org.drools.compiler.DroolsParserException,
                    IOException
Specified by:
compile in interface ICompilable
Throws:
org.drools.compiler.DroolsParserException
IOException

isStandAloneRule

public static boolean isStandAloneRule(String content)
This will try and sniff ouf if its a stand alone rule which will use the asset name as the rule name, or if it should be treated as a package (in the latter case, the content is passed as it to the compiler).


assembleDRL

public void assembleDRL(BRMSPackageBuilder builder,
                        Asset asset,
                        StringBuilder stringBuilder)
Specified by:
assembleDRL in interface IRuleAsset

assembleDRL

public void assembleDRL(BRMSPackageBuilder builder,
                        AssetItem asset,
                        StringBuilder stringBuilder)
Specified by:
assembleDRL in interface IRuleAsset

getRawDRL

public String getRawDRL(AssetItem asset)
Specified by:
getRawDRL in interface IRuleAsset

Guvnor web application Drools 6.0.0-SNAPSHOT

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.