org.jboss.drools.guvnor.importgenerator
Class PackageFile

java.lang.Object
  extended by org.jboss.drools.guvnor.importgenerator.PackageFile

public class PackageFile
extends Object

Represents a drl package file found in the file system


Constructor Summary
PackageFile()
           
 
Method Summary
 void addCompilationError(String compilationError)
           
 void addDependencyError(String dependencyError)
           
 void addImports(String imports)
           
 void addRuleFile(File ruleFile)
           
 void buildPackage()
          compiles the rule files into a package and generates any error details
static Map<String,PackageFile> buildPackages(CmdArgsParser options)
          goes through the file system calling extract to build a list of PackageFile objects
 void buildPackageWithAccurateDependencyErrorDetection()
          impl that determines whether you have dependency errors - this is not completed - unsure how to display/count error packages if you get one comp error and one dep error in a simple package
 String getCompilationErrors()
           
 String getDependencyErrors()
           
 File getFile()
           
 String getFormat()
           
 String getImports()
           
 String getName()
           
 org.drools.rule.Package getPkg()
           
 List<File> getRuleFiles()
           
 Map<String,Rule> getRules()
           
 boolean hasCompilationErrors()
           
 boolean hasDependencyErrors()
           
 boolean hasErrors()
           
 boolean isFormat(org.jboss.drools.guvnor.importgenerator.PackageFile.Format isFormat)
           
 void setCompilationErrors(String compilationErrors)
           
 void setDependencyErrors(String dependencyErrors)
           
 void setFile(File file)
           
 void setName(String name)
           
 void setPkg(org.drools.rule.Package pkg)
           
 void setRules(Map<String,Rule> rules)
           
 byte[] toByteArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackageFile

public PackageFile()
Method Detail

buildPackages

public static Map<String,PackageFile> buildPackages(CmdArgsParser options)
                                             throws Exception
goes through the file system calling extract to build a list of PackageFile objects

Parameters:
options -
Returns:
Throws:
Exception

buildPackage

public void buildPackage()
                  throws IOException,
                         org.drools.compiler.DroolsParserException
compiles the rule files into a package and generates any error details

Throws:
IOException
org.drools.compiler.DroolsParserException

buildPackageWithAccurateDependencyErrorDetection

public void buildPackageWithAccurateDependencyErrorDetection()
                                                      throws IOException,
                                                             org.drools.compiler.DroolsParserException
impl that determines whether you have dependency errors - this is not completed - unsure how to display/count error packages if you get one comp error and one dep error in a simple package

Throws:
IOException
org.drools.compiler.DroolsParserException

toByteArray

public byte[] toByteArray()
                   throws IOException
Returns:
Throws:
IOException

addRuleFile

public void addRuleFile(File ruleFile)

getRuleFiles

public List<File> getRuleFiles()

isFormat

public boolean isFormat(org.jboss.drools.guvnor.importgenerator.PackageFile.Format isFormat)

getFormat

public String getFormat()

getFile

public File getFile()

setFile

public void setFile(File file)

getDependencyErrors

public String getDependencyErrors()

setDependencyErrors

public void setDependencyErrors(String dependencyErrors)

hasDependencyErrors

public boolean hasDependencyErrors()

addDependencyError

public void addDependencyError(String dependencyError)

getCompilationErrors

public String getCompilationErrors()

setCompilationErrors

public void setCompilationErrors(String compilationErrors)

hasCompilationErrors

public boolean hasCompilationErrors()

addCompilationError

public void addCompilationError(String compilationError)

hasErrors

public boolean hasErrors()

getPkg

public org.drools.rule.Package getPkg()

setPkg

public void setPkg(org.drools.rule.Package pkg)

getImports

public String getImports()

addImports

public void addImports(String imports)

getRules

public Map<String,Rule> getRules()

setRules

public void setRules(Map<String,Rule> rules)

getName

public String getName()

setName

public void setName(String name)

toString

public String toString()
Overrides:
toString in class Object


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