All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.honoriuss.blossom.BlossomOptionalParameterProviderImpl Maven / Gradle / Ivy

There is a newer version: 0.2.6
Show newest version
package io.github.honoriuss.blossom;

import io.github.honoriuss.blossom.interfaces.ITrackingParameterProvider;
import jakarta.servlet.http.HttpServletRequest;

import java.util.HashMap;
import java.util.Map;

class BlossomOptionalParameterProviderImpl implements ITrackingParameterProvider {
    private final Map headers;
    private final HttpServletRequest request;

    public BlossomOptionalParameterProviderImpl(Map headers, HttpServletRequest request) {
        this.headers = headers;
        this.request = request;
    }

    @Override
    public HashMap getBaseParameters() {
        var map = new HashMap();
        for (var headerKey : headers.keySet()) {
            map.put(headers.get(headerKey), request.getHeader(headerKey));
        }
        return map;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy