Interface Validator

All Known Implementing Classes:
ValidatorImpl

public interface Validator
  • Method Details

    • getErrorCompatibleMessages

      default List<String> getErrorCompatibleMessages(ValidatorConfig config, Language language)
      Gets the error messages for compatibility.
      Parameters:
      config - the config that gets validated
      language - the language of the errors
      Returns:
      the error messages
    • getErrorInstallableMessages

      default List<String> getErrorInstallableMessages(ValidatorConfig config, Language language)
      Gets the error messages for installation.
      Parameters:
      config - the config that gets validated
      language - the language of the errors
      Returns:
      the error messages
    • getStatus

      default OpenemsAppStatus getStatus(ValidatorConfig config)
      Validates the Checkables and gets the Status.
      Parameters:
      config - the config that gets validated
      Returns:
      the Status
    • toJsonObject

      default com.google.gson.JsonObject toJsonObject(ValidatorConfig config, Language language)
      Builds a JsonObject out of the given ValidatorConfig.
      Parameters:
      config - the config that gets validated
      language - 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 given Checkable.
      Parameters:
      checkableConfigs - the Checkables to be checked.
      language - the language of the errors
      returnImmediate - after the first checkable who returns false
      Returns:
      a list of errors
    • checkStatus

      default void checkStatus(OpenemsApp openemsApp, Language language) throws OpenemsError.OpenemsNamedException
      Checks the current status of an OpenemsApp and throws an exception if the app can not be installed.
      Parameters:
      openemsApp - the OpenemsApp to check
      language - the current Language
      Throws:
      OpenemsError.OpenemsNamedException - on status error