public final class ValidationResult extends Object
Modifier and Type | Method and Description |
---|---|
ConfigModel |
getConfigModel()
Get the configModel section.
|
String |
getMessage()
Get the detail message.
|
ValidationState |
getResult()
Get the configModel result.
|
static ValidationResult |
of(ConfigModel configModel,
ValidationState result,
String message)
Constructor.
|
static ValidationResult |
ofDeprecated(ConfigModel configModel)
Creates a new ValidationResult.
|
static ValidationResult |
ofDeprecated(ConfigModel configModel,
String alternativeUsage)
Creates a new ValidationResult.
|
static ValidationResult |
ofError(ConfigModel configModel,
String error)
Creates a new ValidationResult.
|
static ValidationResult |
ofMissing(ConfigModel configModel)
Creates a new ValidationResult.
|
static ValidationResult |
ofMissing(ConfigModel configModel,
String message)
Creates a new ValidationResult.
|
static ValidationResult |
ofUndefined(String key,
ModelType type,
String provider)
Creates a new ValidationResult.
|
static ValidationResult |
ofValid(ConfigModel configModel)
Creates a new ValidationResult.
|
static ValidationResult |
ofWarning(ConfigModel configModel,
String warning)
Creates a new ValidationResult.
|
String |
toString() |
public static ValidationResult ofValid(ConfigModel configModel)
configModel
- the configModel item, not null.public static ValidationResult ofMissing(ConfigModel configModel)
configModel
- the configModel item, not null.public static ValidationResult ofMissing(ConfigModel configModel, String message)
configModel
- the configModel item, not null.message
- Additional message to be shown (optional).public static ValidationResult ofError(ConfigModel configModel, String error)
configModel
- the configModel item, not null.error
- error message to add.public static ValidationResult ofWarning(ConfigModel configModel, String warning)
configModel
- the configModel item, not null.warning
- warning message to add.public static ValidationResult ofDeprecated(ConfigModel configModel, String alternativeUsage)
configModel
- the configModel item, not null.alternativeUsage
- allows setting a message to indicate non-deprecated replacement, maybe null.public static ValidationResult ofDeprecated(ConfigModel configModel)
configModel
- the configModel item, not null.public static ValidationResult ofUndefined(String key, ModelType type, String provider)
key
- the name/model keytype
- model typeprovider
- model provider namepublic static ValidationResult of(ConfigModel configModel, ValidationState result, String message)
configModel
- the configModel item, not null.result
- the configModel result, not null.message
- the detail message.public ConfigModel getConfigModel()
public ValidationState getResult()
public String getMessage()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.