@Deprecated public void createRecentCatalogService(CatalogService catalogService, StorageOSUser user) { List<RecentService> recentServices = getRecentServices(user.getUserName()); if (catalogService != null) { RecentService found = findRecentService(recentServices, catalogService, user); if (found != null) { // Delete and Re-Save to update Created Time client.delete(found); createRecentService(catalogService.getId(), user.getUserName()); } else { cleanUpRecentServices(recentServices); createRecentService(catalogService.getId(), user.getUserName()); } } }
@Deprecated public List<CatalogService> getRecentCatalogServices(StorageOSUser user) { List<CatalogService> catalogServices = Lists.newArrayList(); List<RecentService> recentServices = getRecentServices(user.getUserName()); for (RecentService recentService : recentServices) { CatalogService catalogService = client.catalogServices().findById(recentService.getCatalogServiceId()); if (catalogService != null) { catalogServices.add(catalogService); } } SortedIndexUtils.sort(catalogServices); return catalogServices; }