Search in sources :

Example 1 with MemberDetailsForm

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

the class ResultContainer method findConsortium.

@RequestMapping(value = "/find-consortium.json", method = RequestMethod.GET)
@ResponseBody
public MemberDetailsForm findConsortium(@RequestParam("id") String id) {
    MemberDetails memberDetails = salesForceManager.retrieveFreshDetails(id);
    MemberDetailsForm consortiumForm = MemberDetailsForm.fromMemberDetails(memberDetails);
    List<Contact> contactsList = salesForceManager.retrieveFreshContactsByAccountId(id);
    salesForceManager.addOrcidsToContacts(contactsList);
    salesForceManager.addAccessInfoToContacts(contactsList, memberDetails.getMember().getId());
    consortiumForm.setContactsList(contactsList);
    consortiumForm.setRoleMap(generateSalesForceRoleMap());
    return consortiumForm;
}
Also used : MemberDetails(org.orcid.core.salesforce.model.MemberDetails) MemberDetailsForm(org.orcid.pojo.ajaxForm.MemberDetailsForm) Contact(org.orcid.core.salesforce.model.Contact) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with MemberDetailsForm

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

the class SelfServiceController method getConsortium.

@RequestMapping(value = "/get-member-details.json", method = RequestMethod.GET)
@ResponseBody
public MemberDetailsForm getConsortium(@RequestParam("accountId") String accountId) {
    checkAccess(accountId);
    MemberDetails memberDetails = salesForceManager.retrieveDetails(accountId);
    MemberDetailsForm consortiumForm = MemberDetailsForm.fromMemberDetails(memberDetails);
    consortiumForm.setAllowedFullAccess(isAllowedFullAccess(accountId));
    return consortiumForm;
}
Also used : MemberDetails(org.orcid.core.salesforce.model.MemberDetails) MemberDetailsForm(org.orcid.pojo.ajaxForm.MemberDetailsForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

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