Search in sources :

Example 41 with Item

use of net.minecraft.server.v1_11_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);
}
Also used : OrcidProfile(org.orcid.jaxb.model.message.OrcidProfile) Item(org.orcid.jaxb.model.notification.permission_v2.Item) ArrayList(java.util.ArrayList)

Example 42 with Item

use of net.minecraft.server.v1_11_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);
}
Also used : Item(org.orcid.jaxb.model.notification.permission_v2.Item) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID)

Example 43 with Item

use of net.minecraft.server.v1_11_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;
}
Also used : Item(org.orcid.jaxb.model.notification.permission_v2.Item)

Example 44 with Item

use of net.minecraft.server.v1_11_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);
}
Also used : Item(org.orcid.jaxb.model.notification.permission_v2.Item)

Example 45 with Item

use of net.minecraft.server.v1_11_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);
}
Also used : Item(org.orcid.jaxb.model.notification.permission_v2.Item)

Aggregations

Item (org.orcid.jaxb.model.notification.permission_v2.Item)19 CraftItemStack (org.bukkit.craftbukkit.v1_11_R1.inventory.CraftItemStack)17 ItemStack (org.bukkit.inventory.ItemStack)13 NBTTagCompound (net.minecraft.server.v1_11_R1.NBTTagCompound)12 Test (org.junit.Test)7 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)7 Field (java.lang.reflect.Field)6 ItemStack (net.minecraft.server.v1_11_R1.ItemStack)5 Item (net.minecraft.server.v1_12_R1.Item)5 Items (org.orcid.jaxb.model.notification.permission_v2.Items)5 ArrayList (java.util.ArrayList)4 Container (net.minecraft.server.v1_11_R1.Container)3 NBTTagList (net.minecraft.server.v1_11_R1.NBTTagList)3 NBTTagString (net.minecraft.server.v1_11_R1.NBTTagString)3 ItemMeta (org.bukkit.inventory.meta.ItemMeta)3 CompoundTag (com.wasteofplastic.org.jnbt.CompoundTag)2 ListTag (com.wasteofplastic.org.jnbt.ListTag)2 StringTag (com.wasteofplastic.org.jnbt.StringTag)2 Tag (com.wasteofplastic.org.jnbt.Tag)2 IconMenuItem (de.Keyle.MyPet.api.gui.IconMenuItem)2