use of net.minecraft.server.v1_16_R1.Item in project ORCID-Source by ORCID.
the class NotificationManagerImpl method sendAmendEmail.
@Override
public void sendAmendEmail(String orcid, AmendedSection amendedSection, Item item) {
OrcidProfile amendedProfile = orcidProfileManager.retrieveOrcidProfile(orcid, LoadOptions.BIO_AND_INTERNAL_ONLY);
Collection<Item> items = new ArrayList<Item>(1);
if (item != null) {
items.add(item);
}
sendAmendEmail(amendedProfile, amendedSection, items);
}
use of net.minecraft.server.v1_16_R1.Item in project ORCID-Source by ORCID.
the class ExternalIDValidator method validateNotificationItems.
public void validateNotificationItems(Items items) {
if (items == null)
return;
List<String> errors = Lists.newArrayList();
for (Item i : items.getItems()) {
if (i.getExternalIdentifier() != null && i.getExternalIdentifier().getType() != null) {
ExternalID extId = i.getExternalIdentifier();
if (extId.getType() == null || !identifierTypeManager.fetchIdentifierTypesByAPITypeName(null).containsKey(extId.getType())) {
errors.add(i.getExternalIdentifier().getType());
}
if (PojoUtil.isEmpty(extId.getValue())) {
errors.add("value");
}
if (requireRelationshipOnExternalIdentifier) {
if (extId.getRelationship() == null) {
errors.add("relationship");
}
}
}
}
checkAndThrow(errors);
}
use of net.minecraft.server.v1_16_R1.Item in project ORCID-Source by ORCID.
the class AffiliationsManagerImpl method createItem.
private Item createItem(OrgAffiliationRelationEntity orgAffiliationEntity) {
Item item = new Item();
item.setItemName(orgAffiliationEntity.getOrg().getName());
item.setItemType(AffiliationType.EDUCATION.equals(orgAffiliationEntity.getAffiliationType()) ? ItemType.EDUCATION : ItemType.EMPLOYMENT);
item.setPutCode(String.valueOf(orgAffiliationEntity.getId()));
return item;
}
use of net.minecraft.server.v1_16_R1.Item in project ORCID-Source by ORCID.
the class PeerReviewManagerImpl method createItemList.
private List<Item> createItemList(PeerReviewEntity peerReviewEntity) {
Item item = new Item();
item.setItemName(peerReviewEntity.getSubjectName());
item.setItemType(ItemType.PEER_REVIEW);
item.setPutCode(String.valueOf(peerReviewEntity.getId()));
return Arrays.asList(item);
}
use of net.minecraft.server.v1_16_R1.Item in project ORCID-Source by ORCID.
the class AffiliationsManagerImpl method createItemList.
private List<Item> createItemList(OrgAffiliationRelationEntity orgAffiliationEntity) {
Item item = new Item();
item.setItemName(orgAffiliationEntity.getOrg().getName());
item.setItemType(AffiliationType.EDUCATION.value().equals(orgAffiliationEntity.getAffiliationType().value()) ? ItemType.EDUCATION : ItemType.EMPLOYMENT);
item.setPutCode(String.valueOf(orgAffiliationEntity.getId()));
return Arrays.asList(item);
}
Aggregations