if(stringCategories == null || stringCategories.isEmpty()){
return;
}
Site site = getSite();
for(String stringCategory: stringCategories){
Category category = site.getCategory(stringCategory);
if(category == null){
String nicename = site.toNicename(stringCategory);
category = new CategoryImpl(nicename, stringCategory, site);
//add to site categories
site.getCategories().add(category);
}
category.getPosts().add(this);
this.categories.add(category);
}
}