use of org.apache.shindig.social.core.model.ListFieldImpl in project liferay-ide by liferay.
the class LiferayPersonService method getPhoneNumbers.
protected List<ListField> getPhoneNumbers(String className, long classPK) throws Exception {
List<ListField> phoneNumbers = new ArrayList<ListField>();
List<com.liferay.portal.model.Phone> liferayPhones = PhoneServiceUtil.getPhones(className, classPK);
for (com.liferay.portal.model.Phone liferayPhone : liferayPhones) {
ListField phoneNumber = new ListFieldImpl(liferayPhone.getType().getName(), liferayPhone.getNumber());
phoneNumbers.add(phoneNumber);
}
return phoneNumbers;
}
use of org.apache.shindig.social.core.model.ListFieldImpl in project liferay-ide by liferay.
the class LiferayPersonService method getEmails.
protected List<ListField> getEmails(User user) throws Exception {
List<ListField> emails = new ArrayList<ListField>();
ListField email = new ListFieldImpl(Field.PRIMARY.toString(), user.getEmailAddress());
emails.add(email);
List<EmailAddress> emailAddresses = EmailAddressLocalServiceUtil.getEmailAddresses(user.getCompanyId(), User.class.getName(), user.getUserId());
for (EmailAddress emailAddress : emailAddresses) {
email = new ListFieldImpl(emailAddress.getType().getName(), emailAddress.getAddress());
emails.add(email);
}
return emails;
}
Aggregations