Interface Atomos.HeaderProvider

    • Method Detail

      • apply

        Optional<Map<String,​String>> apply​(String location,
                                                 Map<String,​String> existingHeaders)
        Applies this header provider function to the specified AtomosContent location and map of existing headers. The returned Optional map of headers will be used by the ConnectContent.getHeaders() method for the ConnectContent associated with the AtomosContent that has the specified location.

        This method allows a header provider to augment existing bundle manifest headers or add completely new bundle manifest headers that are not present in the existing headers.

        This function may be applied before the instance of the AtomosContent instance is created which may result in the symbolic name and or version of the AtomosContent to be influenced by this function.

        Specified by:
        apply in interface BiFunction<String,​Map<String,​String>,​Optional<Map<String,​String>>>
        Parameters:
        location - The AtomosContent location
        existingHeaders - The existing headers found for the AtomosContent
        Returns:
        the Optional map of headers to use instead of the existingHeaders. If the existing headers should be used then an empty Optional may be returned.