Class ProblemsReporter
java.lang.Object
org.mule.runtime.extension.api.loader.ProblemsReporter
Collects
problems found while validating an ExtensionModel.
The purpose is to simply notify all the problems found together.- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionProblemsReporter(org.mule.runtime.api.meta.model.ExtensionModel extensionModel) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionAdds an erroraddWarning(Problem problem) Adds a warningorg.mule.runtime.api.meta.model.ExtensionModelbooleanbooleantoString()
-
Constructor Details
-
ProblemsReporter
public ProblemsReporter(org.mule.runtime.api.meta.model.ExtensionModel extensionModel) Creates a new instance- Parameters:
extensionModel- the model which is being validated
-
-
Method Details
-
addError
Adds an error- Parameters:
problem- the problem found- Returns:
thisreporter
-
addWarning
Adds a warning- Parameters:
problem- the warning found- Returns:
thisreporter
-
hasErrors
public boolean hasErrors()- Returns:
- Whether errors have been reported
-
hasWarnings
public boolean hasWarnings()- Returns:
- Whether warnings have been reported
-
getExtensionModel
public org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()- Returns:
- The
ExtensionModelthat is being/was validated
-
getErrors
- Returns:
- immutable list of errors found
-
getWarnings
- Returns:
- immutable list of warnings found
-
getWarningsAsString
- Returns:
- All the found warnings flattened as a String
-
toString
-