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

io.github.honoriuss.blossom.BlossomFactory 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.*;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;
import java.util.Map;

abstract class BlossomFactory {
    public static ITrackingHandler getDefaultTracking(ITrackingWriter trackingWriter) {
        return new BlossomHandlerImpl(trackingWriter);
    }

    public static ITrackingObjectMapper getDefaultObjectMapper(ITrackingParameterRegistry parameterRegistry) {
        return new BlossomObjectMapperImpl(parameterRegistry);
    }

    public static ITrackingWriter getDefaultWriter() {
        return new BlossomWriterImpl();
    }

    public static ITrackingParameterRegistry getDefaultParameterRegistry(List parameterProviderList) {
        return new BlossomParameterRegistryImpl(parameterProviderList);
    }

    public static ITrackingFilter getDefaultFilter(String sessionIdHeaderName, String timestampName) {
        return new BlossomFilterImpl(sessionIdHeaderName, timestampName);
    }

    public static ITrackingParameterProvider getOptionalHeaderParameterProvider(Map headers, HttpServletRequest request) {
        return new BlossomOptionalParameterProviderImpl(headers, request);
    }

    public static ITrackingAppContextHandler getDefaultAppContextHandler() {
        return new BlossomAppContextHandlerImpl();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy