StringBuffer tags = new StringBuffer();
Iterator<Tag> currentEntryTags = entry.getAllTags().iterator();
//Build a string out of blog entry tags and seperate them by comma
while (currentEntryTags.hasNext()) {
Tag currentTag = currentEntryTags.next();
if (currentTag.getName() != null && !currentTag.getName().equals("")) {
tags.append(currentTag.getName());
if (currentEntryTags.hasNext()) {
tags.append(",");
}
}
}