ActivityDomReader reader = new PersistentActivityDomReader();
List<String> itemIds = new ArrayList<String>(items.size());
for (Element item : items) {
Element entry = item.element("entry");
if (entry != null) {
ActivityEntry activity = reader.readEntry(new ElementAdapter(entry));
Log.debug("ActivityPublishHandler received activity: " + activity);
try {
if ((activity.getId()!=null) && (activity.getId().length()!=0))
activityManager.updateActivity(sender.toBareJID(), activity);
else{