Exemplo n.º 1
0
 public SendHandler(ICatalogHandler catalogHandler, IFiksIOSender sender, IAsicEncrypter asicEncrypter, IPublicKeyProvider publicKeyProvider)
 {
     _sender            = sender;
     _asicEncrypter     = asicEncrypter;
     _publicKeyProvider = publicKeyProvider;
     _catalogHandler    = catalogHandler;
 }
Exemplo n.º 2
0
 public SendHandler(
     ICatalogHandler catalogHandler,
     IMaskinportenClient maskinportenClient,
     FiksIOSenderConfiguration senderConfiguration,
     IntegrasjonConfiguration integrasjonConfiguration,
     IAsicEncrypter asicEncrypter)
     : this(
         catalogHandler,
         new FiksIOSender(senderConfiguration, maskinportenClient, integrasjonConfiguration.IntegrasjonId, integrasjonConfiguration.IntegrasjonPassord),
         asicEncrypter)
 {
 }
Exemplo n.º 3
0
        internal FiksIOClient(
            FiksIOConfiguration configuration,
            ICatalogHandler catalogHandler         = null,
            IMaskinportenClient maskinportenClient = null,
            ISendHandler sendHandler = null,
            IDokumentlagerHandler dokumentlagerHandler = null,
            IAmqpHandler amqpHandler             = null,
            HttpClient httpClient                = null,
            IPublicKeyProvider publicKeyProvider = null)
        {
            KontoId = configuration.KontoConfiguration.KontoId;

            maskinportenClient = maskinportenClient ?? new MaskinportenClient(configuration.MaskinportenConfiguration, httpClient);

            _catalogHandler = catalogHandler ?? new CatalogHandler(
                configuration.KatalogConfiguration,
                configuration.IntegrasjonConfiguration,
                maskinportenClient,
                httpClient);

            _publicKeyProvider = publicKeyProvider ?? new CatalogPublicKeyProvider(_catalogHandler);

            var asicEncrypter = new AsicEncrypter(new AsiceBuilderFactory(), new EncryptionServiceFactory());

            _sendHandler = sendHandler ??
                           new SendHandler(
                _catalogHandler,
                maskinportenClient,
                configuration.FiksIOSenderConfiguration,
                configuration.IntegrasjonConfiguration,
                httpClient,
                asicEncrypter,
                _publicKeyProvider);

            _dokumentlagerHandler = dokumentlagerHandler ?? new DokumentlagerHandler(
                configuration.DokumentlagerConfiguration,
                configuration.IntegrasjonConfiguration,
                maskinportenClient,
                httpClient: httpClient);

            _amqpHandler = amqpHandler ?? new AmqpHandler(
                maskinportenClient,
                _sendHandler,
                _dokumentlagerHandler,
                configuration.AmqpConfiguration,
                configuration.IntegrasjonConfiguration,
                configuration.KontoConfiguration);
        }
Exemplo n.º 4
0
 public CatalogPublicKeyProvider(ICatalogHandler catalogHandler)
 {
     _catalogHandler = catalogHandler;
 }