org.appng.api.model

## Interface FeatureProvider

- All Known Implementing Classes:
    FeatureProviderImpl, TestBase.SimpleFeatureProvider

      public interface FeatureProvider

  A `Application` can make use of several features provided by appNG. To enable a feature, a certain `Property` needs to be set for the `Application`. This can be done in the application's `application-info.xml` or via the administration-tool.

  Author:
    Matthias Herlitzius

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` .

- - ### Method Detail

    - #### getImageProcessor

          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`.
      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

          File getImageCache()

      Returns the folder to use for caching images, only available if `featureImageProcessing` is enabled.
      Returns:
        the cache folder for images
      See Also:
        `getImageProcessor(File, String)`

    - #### getIndexer

          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` .
      Returns:
        a `Consumer` consuming `DocumentEvent`s produced by a `DocumentProducer`

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