use of org.eclipse.epp.internal.mpc.core.service.CachingMarketplaceService in project epp.mpc by eclipse.
the class ServiceLocator method createMarketplaceService.
protected IMarketplaceService createMarketplaceService(String baseUrl) {
IMarketplaceService service;
URL base;
try {
base = URLUtil.toURL(baseUrl);
} catch (MalformedURLException e) {
throw new IllegalArgumentException(e);
}
DefaultMarketplaceService defaultService = new DefaultMarketplaceService(base);
Map<String, String> requestMetaParameters = computeDefaultRequestMetaParameters();
defaultService.setRequestMetaParameters(requestMetaParameters);
IUserFavoritesService favoritesService = getFavoritesService(baseUrl);
// FIXME this should be a service reference!
defaultService.setUserFavoritesService(favoritesService);
service = new CachingMarketplaceService(defaultService);
return service;
}
Aggregations