//get all categories map
private Map<String, CategoryType> getAllCategories() throws Exception {
if (!siteCategoriesMap.containsKey(this.apiContext.getSite())) {
Map<String, CategoryType> catsMap = new HashMap<String, CategoryType>(30000);
CategoriesDownloader cd = new CategoriesDownloader(this.apiContext);
CategoryType[] cats = cd.getAllCategories();
for (CategoryType cat : cats) {
catsMap.put(cat.getCategoryID(), cat);
}
siteCategoriesMap.put(this.apiContext.getSite(), catsMap);