Interface Validator
- All Known Implementing Classes:
ValidatorImpl
public interface Validator
-
Method Summary
Modifier and TypeMethodDescriptiongetErrorCompatibleMessages
(ValidatorConfig config, Language language) Gets the error messages for compatibility.getErrorInstallableMessages
(ValidatorConfig config, Language language) Gets the error messages for installation.getErrorMessages
(List<ValidatorConfig.CheckableConfig> checkableConfigs, Language language, boolean returnImmediate) Gets the error messages for the givenCheckable
.default OpenemsAppStatus
getStatus
(ValidatorConfig config) Validates theCheckable
s and gets the Status.default com.google.gson.JsonObject
toJsonObject
(ValidatorConfig config, Language language) Builds aJsonObject
out of the givenValidatorConfig
.
-
Method Details
-
getErrorCompatibleMessages
Gets the error messages for compatibility.- Parameters:
config
- the config that gets validatedlanguage
- the language of the errors- Returns:
- the error messages
-
getErrorInstallableMessages
Gets the error messages for installation.- Parameters:
config
- the config that gets validatedlanguage
- the language of the errors- Returns:
- the error messages
-
getStatus
Validates theCheckable
s and gets the Status.- Parameters:
config
- the config that gets validated- Returns:
- the Status
-
toJsonObject
Builds aJsonObject
out of the givenValidatorConfig
.- Parameters:
config
- the config that gets validatedlanguage
- the language of the errors- Returns:
- the
JsonObject
-
getErrorMessages
List<String> getErrorMessages(List<ValidatorConfig.CheckableConfig> checkableConfigs, Language language, boolean returnImmediate) Gets the error messages for the givenCheckable
.- Parameters:
checkableConfigs
- theCheckable
s to be checked.language
- the language of the errorsreturnImmediate
- after the first checkable who returns false- Returns:
- a list of errors
-