com.pdfunit.validators

## Class MultiDocumentSingleFieldValidator

- java.lang.Object
- - com.pdfunit.validators.MultiDocumentSingleFieldValidator

-     @DoNotObfuscate
      public final class MultiDocumentSingleFieldValidator
      extends java.lang.Object

  Validator for a single field of an acro form in each of the given PDF documents.
  Since:
    2016.05
  Author:
    Carsten Siedentop, March 2016
  See Also:
    `SingleFieldValidator`

- - ### Property Summary

    Properties
    Type | Property and Description
    --- | ---
    `MultiDocumentFieldPropertyValidator` | `with`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MultiDocumentSingleFieldValidator(MultiDocumentValidator backReference)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiDocumentSingleFieldValidator` | `containing(java.lang.String expectedValue)` Validating that the content of the current field contains the value given by the parameter.
    `MultiDocumentSingleFieldValidator` | `endingWith(java.lang.String expectedValue)` Validating that the content of the current field ends with the value given by the parameter.
    `MultiDocumentSingleFieldValidator` | `equalsTo(java.lang.String expectedValue)` Validating that the content of the current field is equal to the given parameter.
    `MultiDocumentSingleFieldValidator` | `hasField(java.lang.String expectedFieldName)` This method verifies that each of the given PDF document has a field with the expected name.
    `MultiDocumentSingleFieldValidator` | `matchingRegex(java.lang.String regex)` Validating that the content of the current field matches the regular expression.
    `MultiDocumentSingleFieldValidator` | `notContaining(java.lang.String expectedValue)` Validating that the content of the current field does NOT contain the value given by the parameter.
    `MultiDocumentSingleFieldValidator` | `notMatchingRegex(java.lang.String regex)` Validating that the content of the current field does not match the regular expression.
    `MultiDocumentSingleFieldValidator` | `ofType(FieldType expectedType)` This method verifies that each of the given PDF document has a field with the expected type.
    `MultiDocumentSingleFieldValidator` | `startingWith(java.lang.String expectedValue)` Validating that the content of the current field starts with the value given by the parameter.
    `MultiDocumentSingleFieldValidator` | `withHeight(int expectedHeight)` This method verifies that the current field has the height equals to the given parameter.
    `MultiDocumentSingleFieldValidator` | `withHeight(int expectedHeight, FormatUnit formatUnit, int allowedDelta)` This method verifies that the current field of each PDF document has the height equals to the given parameter.
    `MultiDocumentSingleFieldJavaScriptValidator` | `withJavaScript()` This method looks for the name of a JavaScript action wich is bound to a field.
    `MultiDocumentSingleFieldValidator` | `withoutTextOverflow()` This method validates that the content of the current field fits inside the size of the field.
    `MultiDocumentFieldPropertyValidator` | `withProperty()`
    `MultiDocumentSingleFieldValidator` | `withText()` Validating that the content of the current field is not empty.
    `MultiDocumentSingleFieldValidator` | `withWidth(int expectedWidth)` This method verifies that the current field has the width equals to the given parameter.
    `MultiDocumentSingleFieldValidator` | `withWidth(int expectedWidth, FormatUnit formatUnit, int allowedDelta)` This method verifies that the current field of each PDF document has the width equals to the given parameter.

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

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

- - ### Property Detail

    - #### with

  - ### Constructor Detail

    - #### MultiDocumentSingleFieldValidator

          protected MultiDocumentSingleFieldValidator(MultiDocumentValidator backReference)

  - ### Method Detail

    - #### containing

          @Guarded
          public MultiDocumentSingleFieldValidator containing(java.lang.String expectedValue)

      Validating that the content of the current field contains the value given by the parameter. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### endingWith

          @Guarded
          public MultiDocumentSingleFieldValidator endingWith(java.lang.String expectedValue)

      Validating that the content of the current field ends with the value given by the parameter. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### hasField

          @Guarded
          public MultiDocumentSingleFieldValidator hasField(java.lang.String expectedFieldName)

      This method verifies that each of the given PDF document has a field with the expected name.

    - #### withJavaScript

          public MultiDocumentSingleFieldJavaScriptValidator withJavaScript()

      This method looks for the name of a JavaScript action wich is bound to a field. This was done for every given PDF document. Follow the 'See Also' link to read further documentation.

    - #### equalsTo

          @Guarded
          public MultiDocumentSingleFieldValidator equalsTo(java.lang.String expectedValue)

      Validating that the content of the current field is equal to the given parameter. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### matchingRegex

          @Guarded
          public MultiDocumentSingleFieldValidator matchingRegex(java.lang.String regex)

      Validating that the content of the current field matches the regular expression. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### notContaining

          @Guarded
          public MultiDocumentSingleFieldValidator notContaining(java.lang.String expectedValue)

      Validating that the content of the current field does NOT contain the value given by the parameter. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### notMatchingRegex

          @Guarded
          public MultiDocumentSingleFieldValidator notMatchingRegex(java.lang.String regex)

      Validating that the content of the current field does not match the regular expression. This method is provided, because regular expressions are designed to find something, but not to look for something that is not there. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

      See Also:
        `SingleFieldValidator.notMatchingRegex(String)`

    - #### ofType

          @Guarded
          public MultiDocumentSingleFieldValidator ofType(FieldType expectedType)

      This method verifies that each of the given PDF document has a field with the expected type.

    - #### startingWith

          @Guarded
          public MultiDocumentSingleFieldValidator startingWith(java.lang.String expectedValue)

      Validating that the content of the current field starts with the value given by the parameter. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### withHeight

          @Guarded
          public MultiDocumentSingleFieldValidator withHeight(int expectedHeight)

      This method verifies that the current field has the height equals to the given parameter. This was done for all given PDF documents.

      The format unit is 'POINTS'.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

      See Also:
        `FormatUnit`

    - #### withHeight

          @Guarded
          public MultiDocumentSingleFieldValidator withHeight(int expectedHeight,
                                                             FormatUnit formatUnit,
                                                             int allowedDelta)

      This method verifies that the current field of each PDF document has the height equals to the given parameter. The value is of the unit of the second parameter.

      In case of failure, an instance of PDFUnitValidationException or a subclass of it will be thrown.

      See Also:
        `FormatUnit`

    - #### withoutTextOverflow

          public MultiDocumentSingleFieldValidator withoutTextOverflow()

      This method validates that the content of the current field fits inside the size of the field. This was done for all given PDF documents.

      Only fields of type "button" and "text" are checked, no "choice" and no "sig". Also password fields are not checked.

    - #### withProperty

          public MultiDocumentFieldPropertyValidator withProperty()

    - #### withText

          public MultiDocumentSingleFieldValidator withText()

      Validating that the content of the current field is not empty. This was done for every given PDF document.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### withWidth

          @Guarded
          public MultiDocumentSingleFieldValidator withWidth(int expectedWidth)

      This method verifies that the current field has the width equals to the given parameter. This was done for all given PDF documents.

      The format unit is 'POINTS'.

      In case of failure, an instance of PDFUnitValidationException will be thrown.

    - #### withWidth

          @Guarded
          public MultiDocumentSingleFieldValidator withWidth(int expectedWidth,
                                                            FormatUnit formatUnit,
                                                            int allowedDelta)

      This method verifies that the current field of each PDF document has the width equals to the given parameter. The value is of the unit of the second parameter.

      In case of failure, an instance of PDFUnitValidationException or a subclass of it will be thrown.

      See Also:
        `FormatUnit`

Copyright (C) PDFUnit.com. See here for license.