Search in sources :

Example 1 with ContactsForm

use of org.orcid.pojo.ajaxForm.ContactsForm in project ORCID-Source by ORCID.

the class ManageConsortiumController method getContacts.

@RequestMapping(value = "/get-contacts.json", method = RequestMethod.GET)
@ResponseBody
public ContactsForm getContacts() {
    String accountId = salesForceManager.retrieveAccountIdByOrcid(getCurrentUserOrcid());
    ContactsForm contactsForm = new ContactsForm();
    List<Contact> contactsList = salesForceManager.retrieveContactsByAccountId(accountId);
    salesForceManager.addOrcidsToContacts(contactsList);
    contactsForm.setContactsList(contactsList);
    contactsForm.setRoleMap(generateSalesForceRoleMap());
    return contactsForm;
}
Also used : ContactsForm(org.orcid.pojo.ajaxForm.ContactsForm) Contact(org.orcid.core.salesforce.model.Contact) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Contact (org.orcid.core.salesforce.model.Contact)1 ContactsForm (org.orcid.pojo.ajaxForm.ContactsForm)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1