use of org.orcid.pojo.ajaxForm.OtherNamesForm in project ORCID-Source by ORCID.
the class WorkspaceController method getOtherNamesFormJson.
@RequestMapping(value = "/my-orcid/otherNamesForms.json", method = RequestMethod.GET)
@ResponseBody
public OtherNamesForm getOtherNamesFormJson(HttpServletRequest request) throws NoSuchRequestHandlingMethodException {
long lastModifiedTime = getLastModifiedTime(getCurrentUserOrcid());
OtherNames otherNames = otherNameManager.getOtherNames(getCurrentUserOrcid(), lastModifiedTime);
OtherNamesForm form = OtherNamesForm.valueOf(otherNames);
//Set the default visibility
ProfileEntity profile = profileEntityCacheManager.retrieve(getCurrentUserOrcid());
if (profile != null && profile.getActivitiesVisibilityDefault() != null) {
form.setVisibility(Visibility.valueOf(profile.getActivitiesVisibilityDefault()));
}
return form;
}
Aggregations