org.drools.guvnor.server.util
Class ClassicDRLImporter

java.lang.Object
  extended by org.drools.guvnor.server.util.ClassicDRLImporter

public class ClassicDRLImporter
extends Object

This class imports legacy DRL into a structure suitable for storing more normalised in the repository.


Nested Class Summary
static class ClassicDRLImporter.Asset
          Holds a rule to import.
 
Constructor Summary
ClassicDRLImporter(InputStream in)
           
 
Method Summary
 List<ClassicDRLImporter.Asset> getAssets()
           
 String getPackageHeader()
           
 String getPackageName()
           
static String getRuleName(String line)
          Get the rule name from a declaration line
 boolean isDSLEnabled()
           
static String mergeLines(String existing, String toMerge)
          This merges the toMerge new schtuff into the existing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassicDRLImporter

public ClassicDRLImporter(InputStream in)
                   throws IOException,
                          org.drools.compiler.DroolsParserException
Throws:
IOException
org.drools.compiler.DroolsParserException
Method Detail

getRuleName

public static String getRuleName(String line)
                          throws org.drools.compiler.DroolsParserException
Get the rule name from a declaration line

Throws:
org.drools.compiler.DroolsParserException

getAssets

public List<ClassicDRLImporter.Asset> getAssets()

getPackageName

public String getPackageName()

getPackageHeader

public String getPackageHeader()

isDSLEnabled

public boolean isDSLEnabled()

mergeLines

public static String mergeLines(String existing,
                                String toMerge)
This merges the toMerge new schtuff into the existing. Line by line, simple stuff.



Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.