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

org.notima.businessobjects.adapter.adyen.Activator Maven / Gradle / Ivy

The newest version!
package org.notima.businessobjects.adapter.adyen;

import java.util.Dictionary;
import java.util.Hashtable;

import org.apache.karaf.util.tracker.BaseActivator;
import org.apache.karaf.util.tracker.annotation.ProvideService;
import org.apache.karaf.util.tracker.annotation.Services;
import org.notima.generic.ifacebusinessobjects.PaymentBatchFactory;
import org.notima.generic.ifacebusinessobjects.PaymentFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Services(
		provides = {
				@ProvideService(PaymentFactory.class),
				@ProvideService(PaymentBatchFactory.class)
		}
)
public class Activator extends BaseActivator {

	private Logger log = LoggerFactory.getLogger(Activator.class);	
	
	@Override
	public void doStart() throws Exception {
		super.doStart();
		
		Dictionary props = new Hashtable();
		props.put("SystemName", "Adyen");
		
		AdyenAdapter adyenAdapter = new AdyenAdapter();
		log.info("Created Adyen Adapter");
		register(PaymentFactory.class, adyenAdapter, props);
		
		AdyenDirectoryToPaymentBatch paymentBatchFactory = new AdyenDirectoryToPaymentBatch();
		register(PaymentBatchFactory.class, paymentBatchFactory, props);
		log.info("Created Adyen Batch Adapter");
		log.info("Context: " + this.bundleContext.toString());		
		
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy