//sync and cache all categories features in memory
private void syncAllCategoriesFeatures() throws Exception {
if (!siteCategoriesFeaturesMap.containsKey(this.apiContext.getSite())) {
FeaturesDownloader fd = new FeaturesDownloader(this.apiContext);
GetCategoryFeaturesResponseType cfrt = fd.getAllCategoryFeatures();
CategoryFeatureType[] categoryFeatures = cfrt.getCategory();
Map<String, CategoryFeatureType> cfsMap = new HashMap<String, CategoryFeatureType>(MAP_SIZE);
for (CategoryFeatureType cf: categoryFeatures) {
cfsMap.put(cf.getCategoryID(), cf);
}
siteCategoriesFeaturesMap.put(this.apiContext.getSite(), cfsMap);
siteFeatureDefaultMap.put(this.apiContext.getSite(), cfrt.getSiteDefaults());
siteFeatureDefinitionsMap.put(this.apiContext.getSite(), cfrt.getFeatureDefinitions());
}
}