Package org.openbravo.service.system
Class SystemValidationResult
- java.lang.Object
-
- org.openbravo.service.system.SystemValidationResult
-
public class SystemValidationResult extends Object
Keeps track of the errors/warnings for a certain type of validation.- Author:
- mtaal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SystemValidationResult.SystemValidationType
-
Constructor Summary
Constructors Constructor Description SystemValidationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(SystemValidationResult validationResult)
Add the warnings and errors of one validationResult to this one.void
addError(SystemValidationResult.SystemValidationType validationType, String error)
Adds an error message to the result.void
addWarning(SystemValidationResult.SystemValidationType validationType, String warning)
Adds a warning to the result for a specific validation type.String
getCategory()
Map<SystemValidationResult.SystemValidationType,List<String>>
getErrors()
Map<SystemValidationResult.SystemValidationType,List<String>>
getWarnings()
void
setCategory(String category)
-
-
-
Method Detail
-
addAll
public void addAll(SystemValidationResult validationResult)
Add the warnings and errors of one validationResult to this one.- Parameters:
validationResult
- the warnings/errors of the validationResult are added to this one
-
addWarning
public void addWarning(SystemValidationResult.SystemValidationType validationType, String warning)
Adds a warning to the result for a specific validation type.- Parameters:
validationType
- the type of warningwarning
- the message itself
-
addError
public void addError(SystemValidationResult.SystemValidationType validationType, String error)
Adds an error message to the result.- Parameters:
validationType
- the type of messageerror
- the message text
-
getErrors
public Map<SystemValidationResult.SystemValidationType,List<String>> getErrors()
- Returns:
- Returns the list of error messages by validationType.
-
getWarnings
public Map<SystemValidationResult.SystemValidationType,List<String>> getWarnings()
- Returns:
- Returns the list of warning messages by validationType.
-
getCategory
public String getCategory()
-
setCategory
public void setCategory(String category)
-
-