Package org.drools.compiler.builder.impl
Class BuildResultAccumulatorImpl
- java.lang.Object
-
- org.drools.compiler.builder.impl.BuildResultAccumulatorImpl
-
- All Implemented Interfaces:
BuildResultAccumulator
public class BuildResultAccumulatorImpl extends Object implements BuildResultAccumulator
-
-
Constructor Summary
Constructors Constructor Description BuildResultAccumulatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAll(Collection<? extends org.kie.internal.builder.KnowledgeBuilderResult> results)voidaddBuilderResult(org.kie.internal.builder.KnowledgeBuilderResult result)PackageBuilderErrorsgetErrors()Collection<org.kie.internal.builder.KnowledgeBuilderResult>getInternalResultCollection()org.kie.internal.builder.KnowledgeBuilderResultsgetResults(org.kie.internal.builder.ResultSeverity... problemTypes)Return the knowledge builder results for the listed severities.List<DroolsWarning>getWarnings()booleanhasErrors()This will return true if there were errors in the package building and compiling phasebooleanhasInfo()booleanhasResults(org.kie.internal.builder.ResultSeverity... problemTypes)booleanhasWarnings()voidreportError(org.kie.internal.builder.KnowledgeBuilderError error)voidresetErrors()Reset the error list.voidresetProblems()voidresetWarnings()
-
-
-
Method Detail
-
addBuilderResult
public void addBuilderResult(org.kie.internal.builder.KnowledgeBuilderResult result)
- Specified by:
addBuilderResultin interfaceBuildResultAccumulator
-
hasErrors
public boolean hasErrors()
This will return true if there were errors in the package building and compiling phase- Specified by:
hasErrorsin interfaceBuildResultAccumulator
-
getInternalResultCollection
public Collection<org.kie.internal.builder.KnowledgeBuilderResult> getInternalResultCollection()
-
getResults
public org.kie.internal.builder.KnowledgeBuilderResults getResults(org.kie.internal.builder.ResultSeverity... problemTypes)
Description copied from interface:BuildResultAccumulatorReturn the knowledge builder results for the listed severities.- Specified by:
getResultsin interfaceBuildResultAccumulator
-
hasResults
public boolean hasResults(org.kie.internal.builder.ResultSeverity... problemTypes)
-
hasWarnings
public boolean hasWarnings()
-
hasInfo
public boolean hasInfo()
-
getWarnings
public 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(Collection<? extends org.kie.internal.builder.KnowledgeBuilderResult> results)
-
-