InputNode listNode1 = root1.getNext(); //HACK to handle external attendee's firstname, lastname, email
if (listNodeName.equals(listNode.getName())) {
InputNode item = listNode.getNext();
InputNode item1 = listNode1.getNext(); //HACK to handle external attendee's firstname, lastname, email
while (item != null) {
MeetingMember mm = ser.read(MeetingMember.class, item, false);
boolean needToSkip1 = true;
if (mm.getUser() == null) {
mm.setUser(new User());
}
if (mm.getUser().getUser_id() == null) {
//HACK to handle external attendee's firstname, lastname, email
boolean contactValid = false;
do {
if (Type.contact == mm.getUser().getType() && "firstname".equals(item1.getName())) {
mm.getUser().setFirstname(item1.getValue());
}
if (Type.contact == mm.getUser().getType() && "lastname".equals(item1.getName())) {
mm.getUser().setLastname(item1.getValue());
}
if ("email".equals(item1.getName())) {
String email = item1.getValue();
if (mm.getAppointment() != null && mm.getAppointment().getOwner() != null) {
mm.setUser(usersDao.getContact(email, mm.getAppointment().getOwner()));
}
contactValid = true;
}
item1 = listNode1.getNext(); //HACK to handle old om_time_zone
} while (item1 != null && !"meetingmember".equals(item1.getName()));
if (!contactValid) {
mm = null;
}
needToSkip1 = false;
}
if (needToSkip1) {
do {
item1 = listNode1.getNext(); //HACK to handle Address inside user
} while (item1 != null && !"meetingmember".equals(item1.getName()));
}
item = listNode.getNext();
if (mm != null && !mm.isDeleted() && mm.getUser() != null && mm.getAppointment() != null && mm.getAppointment().getId() != null) {
mm.setId(null);
list.add(mm);
}
}
}
return list;