Package org.drools.compiler.builder.impl
Class BuildResultCollectorImpl
- java.lang.Object
-
- org.drools.compiler.builder.impl.BuildResultCollectorImpl
-
- All Implemented Interfaces:
BuildResultCollector
public class BuildResultCollectorImpl extends java.lang.Object implements BuildResultCollector
-
-
Constructor Summary
Constructors Constructor Description BuildResultCollectorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(java.util.Collection<? extends org.kie.internal.builder.KnowledgeBuilderResult> results)
void
addBuilderResult(org.kie.internal.builder.KnowledgeBuilderResult result)
java.util.Collection<org.kie.internal.builder.KnowledgeBuilderResult>
getAllResults()
PackageBuilderErrors
getErrors()
org.kie.internal.builder.KnowledgeBuilderResults
getResults(org.kie.internal.builder.ResultSeverity... problemTypes)
Return the knowledge builder results for the listed severities.java.util.List<DroolsWarning>
getWarnings()
boolean
hasErrors()
This will return true if there were errors in the package building and compiling phaseboolean
hasInfo()
boolean
hasResults(org.kie.internal.builder.ResultSeverity... problemTypes)
boolean
hasWarnings()
void
reportError(org.kie.internal.builder.KnowledgeBuilderError error)
void
resetErrors()
Reset the error list.void
resetProblems()
void
resetWarnings()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.compiler.builder.impl.BuildResultCollector
add
-
-
-
-
Method Detail
-
addBuilderResult
public void addBuilderResult(org.kie.internal.builder.KnowledgeBuilderResult result)
- Specified by:
addBuilderResult
in interfaceBuildResultCollector
-
hasErrors
public boolean hasErrors()
This will return true if there were errors in the package building and compiling phase- Specified by:
hasErrors
in interfaceBuildResultCollector
-
getAllResults
public java.util.Collection<org.kie.internal.builder.KnowledgeBuilderResult> getAllResults()
- Specified by:
getAllResults
in interfaceBuildResultCollector
-
getResults
public org.kie.internal.builder.KnowledgeBuilderResults getResults(org.kie.internal.builder.ResultSeverity... problemTypes)
Description copied from interface:BuildResultCollector
Return the knowledge builder results for the listed severities.- Specified by:
getResults
in interfaceBuildResultCollector
-
hasResults
public boolean hasResults(org.kie.internal.builder.ResultSeverity... problemTypes)
- Specified by:
hasResults
in interfaceBuildResultCollector
-
hasWarnings
public boolean hasWarnings()
-
hasInfo
public boolean hasInfo()
-
getWarnings
public java.util.List<DroolsWarning> getWarnings()
-
reportError
public void reportError(org.kie.internal.builder.KnowledgeBuilderError error)
-
getErrors
public PackageBuilderErrors getErrors()
- Returns:
- A list of Error objects that resulted from building and compiling the package.
-
resetErrors
public void resetErrors()
Reset the error list. This is useful when incrementally building packages. Care should be used when building this, if you clear this when there were errors on items that a rule depends on (eg functions), then you will get spurious errors which will not be that helpful.
-
resetWarnings
public void resetWarnings()
-
resetProblems
public void resetProblems()
-
addAll
public void addAll(java.util.Collection<? extends org.kie.internal.builder.KnowledgeBuilderResult> results)
- Specified by:
addAll
in interfaceBuildResultCollector
-
-