class OutboundResponseFromHubToResponseTransformerFactory {

    public Function<OutboundResponseFromHub, String> get(String authnRequestIssuerEntityId) {
        if (transactionsConfigProxy.getShouldHubSignResponseMessages(authnRequestIssuerEntityId)) {
            return transactionsConfigProxy.getShouldHubUseLegacySamlStandard(authnRequestIssuerEntityId) ?
                    outboundLegacyResponseFromHubToStringFunctionSHA256 :
                    outboundSamlProfileResponseFromHubToStringFunctionSHA256;
        }
        return simpleProfileOutboundResponseFromHubToResponseTransformerProvider.get();
    }

    @Inject public  OutboundResponseFromHubToResponseTransformerFactory(SimpleProfileOutboundResponseFromHubToResponseTransformerProvider simpleProfileOutboundResponseFromHubToResponseTransformerProvider,
                                                               TransactionsConfigProxy transactionsConfigProxy,
                                                               OutboundSamlProfileResponseFromHubToStringFunctionSHA256 outboundSamlProfileResponseFromHubToStringFunctionSHA256,
                                                               OutboundLegacyResponseFromHubToStringFunctionSHA256 outboundLegacyResponseFromHubToStringFunctionSHA256,
                                                               OutboundAuthnResponseFromCountryContainerToStringFunction outboundAuthnResponseFromCountryContainerToStringFunction);

}