Interface InternalFilterContext

  • All Known Subinterfaces:
    FilterContext

    public interface InternalFilterContext
    An immutable context supplied to the product filters and contains tools to read collection configuration files This interface is only used for product build-in filters Dev should only implement methods from FilterContext And must not implement methods with the same name as methods declared in this interface
    • Method Detail

      • getCollectionConfigFile

        File getCollectionConfigFile​(String filename)

        Provides access to configuration files inside the collection configuration folder.

        This is useful to access custom collection-level configuration files

        Parameters:
        filename - Name of the file to access
        Returns:
        A File path pointing to the desired file inside the collection configuration folder
      • filterConfigurationFileAsBytes

        Optional<byte[]> filterConfigurationFileAsBytes​(String filename)
        Reads a configuration file for the currently running filter. The configuration file read is for the currently running filter for current the data source or search package.
        Parameters:
        filename - the name of the configuration file to read.
        Returns:
        empty if the file doesn't exist, otherwise the contents of the file.
      • filterConfigurationFile

        Optional<String> filterConfigurationFile​(String filename)
        Reads a configuration file for the currently running filter as a UTF-8 String. See: filterConfigurationFile(String)
        Parameters:
        filename - the name of the configuration file to read.
        Returns:
        empty if the file doesn't exist, otherwise the contents of the file.