org.appng.testsupport

## Class TestBase.SimpleFeatureProvider

- java.lang.Object
- - org.appng.testsupport.TestBase.SimpleFeatureProvider

- All Implemented Interfaces:
    FeatureProvider
  Enclosing class:
    TestBase

      protected class TestBase.SimpleFeatureProvider
      extends Object
      implements FeatureProvider

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer` | `getDocumentCount()`
    `File` | `getImageCache()` Returns the folder to use for caching images, only available if `featureImageProcessing` is enabled.
    `ImageProcessor` | `getImageProcessor(File sourceFile, String targetFile)` Returns an `ImageProcessor` for the given sourceFile. To enable this feature, set the `Application`'s `Property` `featureImageProcessing` to `true`.
    `Consumer<DocumentEvent,DocumentProducer>` | `getIndexer()` Returns a `Consumer` which consumes `DocumentEvent`s produced by a `DocumentProducer`.The returned `Consumer` writes to the Lucene-powered search-index of the `Site`. To enable this feature, set the `Application`'s `Property` `featureIndexing` to `true` .

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

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

- - ### Method Detail

    - #### getIndexer

          public Consumer<DocumentEvent,DocumentProducer> getIndexer()

      Description copied from interface: `FeatureProvider`
      Returns a `Consumer` which consumes `DocumentEvent`s produced by a `DocumentProducer`.The returned `Consumer` writes to the Lucene-powered
      search-index of the `Site`.
      To enable this feature, set the `Application`'s `Property` `featureIndexing` to `true` .
      Specified by:
        `getIndexer` in interface `FeatureProvider`
      Returns:
        a `Consumer` consuming `DocumentEvent`s produced by a `DocumentProducer`

    - #### getDocumentCount

          public Integer getDocumentCount()

    - #### getImageProcessor

          public ImageProcessor getImageProcessor(File sourceFile,
                                                  String targetFile)

      Description copied from interface: `FeatureProvider`
      Returns an `ImageProcessor` for the given sourceFile.
      To enable this feature, set the `Application`'s `Property` `featureImageProcessing` to `true`.
      Specified by:
        `getImageProcessor` in interface `FeatureProvider`
      Parameters:
        `sourceFile` - the source image (should have an absolute path)
        `targetFile` - the path to the target file to be created, relative to `Platform.Property.IMAGE_CACHE_FOLDER`.
      Returns:
        an `ImageProcessor` for the given source file

    - #### getImageCache

          public File getImageCache()

      Description copied from interface: `FeatureProvider`
      Returns the folder to use for caching images, only available if `featureImageProcessing` is enabled.
      Specified by:
        `getImageCache` in interface `FeatureProvider`
      Returns:
        the cache folder for images
      See Also:
        `FeatureProvider.getImageProcessor(File, String)`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.