use of org.orcid.core.salesforce.model.ContactRoleType in project ORCID-Source by ORCID.
the class ManageConsortiumController method retrieveContactRoleTypesAsMap.
@ModelAttribute("contactRoleTypes")
public Map<String, String> retrieveContactRoleTypesAsMap() {
Map<String, String> map = new LinkedHashMap<>();
for (ContactRoleType type : ContactRoleType.values()) {
map.put(type.name(), getMessage(buildInternationalizationKey(ContactRoleType.class, type.name())));
}
Map<String, String> sorted = new LinkedHashMap<>();
// @formatter:off
map.entrySet().stream().sorted(Map.Entry.<String, String>comparingByValue()).forEachOrdered(x -> sorted.put(x.getKey(), x.getValue()));
// @formatter:on
return sorted;
}
Aggregations