com.opensymphony.xwork2.validator.validators

## Class VisitorFieldValidator.AppendingValidatorContext

- java.lang.Object
- - com.opensymphony.xwork2.validator.DelegatingValidatorContext
  - - com.opensymphony.xwork2.validator.validators.VisitorFieldValidator.AppendingValidatorContext

- All Implemented Interfaces:
    ValidationAware, LocaleProvider, TextProvider, ValidatorContext
  Enclosing class:
    VisitorFieldValidator

      public static class VisitorFieldValidator.AppendingValidatorContext
      extends DelegatingValidatorContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppendingValidatorContext(ValidatorContext parent, TextProvider textProvider, String field, String message)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addActionError(String anErrorMessage)` Add an Action-level error message to this Action.
    `void` | `addFieldError(String fieldName, String errorMessage)` Add an error message for a given field.
    `String` | `getFieldNameWithField(String fieldName)`
    `String` | `getFullFieldName(String fieldName)` Translates a simple field name into a full field name in Ognl syntax

    - ### Methods inherited from class com.opensymphony.xwork2.validator.DelegatingValidatorContext

      `addActionMessage, getActionErrors, getActionMessages, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getValidationAware, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, isValidLocale, isValidLocaleString, makeLocaleProvider, makeTextProvider, makeValidationAware, setActionErrors, setActionMessages, setFieldErrors, setTextProvider, setValidationAware`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AppendingValidatorContext

          public AppendingValidatorContext(ValidatorContext parent,
                                           TextProvider textProvider,
                                           String field,
                                           String message)

  - ### Method Detail

    - #### getFullFieldName

          public String getFullFieldName(String fieldName)

      Translates a simple field name into a full field name in Ognl syntax
      Specified by:
        `getFullFieldName` in interface `ValidatorContext`
      Overrides:
        `getFullFieldName` in class `DelegatingValidatorContext`
      Parameters:
        `fieldName` - field name in OGNL syntax
      Returns:
        full field name in OGNL syntax

    - #### getFieldNameWithField

          public String getFieldNameWithField(String fieldName)

    - #### addActionError

          public void addActionError(String anErrorMessage)

      Description copied from interface: `ValidationAware`
      Add an Action-level error message to this Action.
      Specified by:
        `addActionError` in interface `ValidationAware`
      Overrides:
        `addActionError` in class `DelegatingValidatorContext`
      Parameters:
        `anErrorMessage` - the error message

    - #### addFieldError

          public void addFieldError(String fieldName,
                                    String errorMessage)

      Description copied from interface: `ValidationAware`
      Add an error message for a given field.
      Specified by:
        `addFieldError` in interface `ValidationAware`
      Overrides:
        `addFieldError` in class `DelegatingValidatorContext`
      Parameters:
        `fieldName` - name of field
        `errorMessage` - the error message

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.