use of org.eclipse.epp.internal.mpc.core.service.MarketplaceStorageService in project epp.mpc by eclipse.
the class ServiceLocator method registerStorageService.
public IMarketplaceStorageService registerStorageService(String marketplaceBaseUrl, String apiServerUrl, String apiKey) {
MarketplaceStorageService marketplaceStorageService = new MarketplaceStorageService();
Hashtable<String, Object> config = new Hashtable<String, Object>();
config.put(IMarketplaceStorageService.STORAGE_SERVICE_URL_PROPERTY, apiServerUrl);
if (apiKey != null) {
config.put(IMarketplaceStorageService.APPLICATION_TOKEN_PROPERTY, apiKey);
}
ServiceRegistration<IMarketplaceStorageService> registration = registerService(marketplaceBaseUrl, IMarketplaceStorageService.class, marketplaceStorageService, config);
BundleContext bundleContext = ServiceUtil.getBundleContext(registration);
if (bundleContext != null) {
marketplaceStorageService.activate(bundleContext, config);
}
return marketplaceStorageService;
}
Aggregations