Class DefaultServiceCommandValidator

    • Constructor Detail

      • DefaultServiceCommandValidator

        public DefaultServiceCommandValidator()
    • Method Detail

      • addFieldValidationError

        public final void addFieldValidationError​(String fieldName,
                                                  String messageKey)
        Add a new validation error. This method must only be called during validation.
        Specified by:
        addFieldValidationError in interface ServiceCommandValidator
        Parameters:
        fieldName - the field that is not valid
        messageKey - the i18n key for the validation error message
      • addValidationError

        public final void addValidationError​(String messageKey,
                                             Object... messageArguments)
        Add a new validation error. This method must only be called during validation.
        Specified by:
        addValidationError in interface ServiceCommandValidator
        Parameters:
        messageKey - the i18n key for the validation error message
        messageArguments - the arguments to be merged into the error message
      • addFieldValidationError

        public final void addFieldValidationError​(String fieldName,
                                                  String messageKey,
                                                  Object... messageArguments)
        Add a new validation error. This method must only be called during validation.
        Specified by:
        addFieldValidationError in interface ServiceCommandValidator
        Parameters:
        fieldName - the field that is not valid
        messageKey - the i18n key for the validation error message
        messageArguments - the arguments to be merged into the error message.