com.pdfunit.validators

## Class MultiDocumentJavaScriptValidator

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

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

  This class is a wrapper around the class JavaScriptValidator to validate the JavaScript in given PDF documents.
  Since:
    2016.05
  Author:
    Carsten Siedentop, March 2016
  See Also:
    `JavaScriptValidator`

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiDocumentJavaScriptValidator` | `containing(java.lang.String expectedJS)` This method looks whether the JavaScript inside each given PDF document contains the expected String.
    `MultiDocumentJavaScriptValidator` | `equalsTo(java.lang.String expectedJS)` This function compares the content given by the parameter with the document level JavaScript of each given PDF document.
    `MultiDocumentJavaScriptValidator` | `equalsToSource(java.io.File expectedJS)` This method reads the file given by the parameter and compares it to the document level JavaScript of each given PDF document.
    `MultiDocumentJavaScriptValidator` | `equalsToSource(java.io.InputStream expectedJS)` This method reads the input stream given by the parameter and compares it to the document level JavaScript of each given PDF document.
    `MultiDocumentJavaScriptValidator` | `equalsToSource(java.io.Reader expectedJS)` This method reads the input given by the parameter and compares it to the document level JavaScript of each given PDF document.
    `MultiDocumentJavaScriptValidator` | `equalsToSource(java.lang.String fileName)` This method reads the file given by the parameter and compares it to the document level JavaScript of each given PDF document.
    `MultiDocumentJavaScriptValidator` | `hasJavaScript()` This method verifies that each of the given PDF document has JavaScript on document level.

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

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

- - ### Constructor Detail

    - #### MultiDocumentJavaScriptValidator

          protected MultiDocumentJavaScriptValidator(MultiDocumentValidator backReference)

  - ### Method Detail

    - #### hasJavaScript

          public MultiDocumentJavaScriptValidator hasJavaScript()

      This method verifies that each of the given PDF document has JavaScript on document level.

    - #### equalsToSource

          @Guarded
          public MultiDocumentJavaScriptValidator equalsToSource(java.lang.String fileName)

      This method reads the file given by the parameter and compares it to the document level JavaScript of each given PDF document. Whitespace will be ignored.

    - #### equalsToSource

          @Guarded
          public MultiDocumentJavaScriptValidator equalsToSource(java.io.File expectedJS)

      This method reads the file given by the parameter and compares it to the document level JavaScript of each given PDF document. Whitespace will be ignored.

    - #### equalsToSource

          @Guarded
          public MultiDocumentJavaScriptValidator equalsToSource(java.io.Reader expectedJS)

      This method reads the input given by the parameter and compares it to the document level JavaScript of each given PDF document. Whitespace will be ignored.

    - #### equalsToSource

          @Guarded
          public MultiDocumentJavaScriptValidator equalsToSource(java.io.InputStream expectedJS)

      This method reads the input stream given by the parameter and compares it to the document level JavaScript of each given PDF document. Whitespace will be ignored.

    - #### containing

          @Guarded
          public MultiDocumentJavaScriptValidator containing(java.lang.String expectedJS)

      This method looks whether the JavaScript inside each given PDF document contains the expected String. Whitespace will be ignored.

    - #### equalsTo

          @Guarded
          public MultiDocumentJavaScriptValidator equalsTo(java.lang.String expectedJS)

      This function compares the content given by the parameter with the document level JavaScript of each given PDF document.

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